...

View Full Version : How do add a space after css div object.



blissdev
12-17-2002, 02:19 AM
i've been trying to add space after my div, but have been unsuccessful so far. When the content become vertically larger than the browser the browser stays tight with the bottom of the browser. How can i add space near the bottom?

http://insideautism.org



/* Defaults */
body {
margin: 0;
padding: 0;
}

/* Content */
#content {
position: absolute;
width: 710px;
height: auto;
left: 50%;
margin-left: -355px;
margin-top: 20px;
border: black 1px solid;
}
.header {
width: 100%;
background: #c0c0c0;
height: auto;
}
.nav {
width: 100%;
background: #003399;
height: auto;
}
.main {
width: 100%;
height: auto;
padding: 10px;
}
.footer {
position:relative;
bottom:0px;
width: 100%;
height: 18px;
background: #c0c0c0;
overflow: hidden;
}

Mhtml
12-17-2002, 05:13 AM
<body bottommargin="2">

blissdev
12-17-2002, 05:57 AM
Thanks for that, i will probably use that in the future. I was able to convert it from absolute to relative, which greatly relieved this problem.

ronaldb66
12-17-2002, 08:46 AM
Arrgh! CSS please! All presentation attributes of the body element were deprecated in HTML 4.01 and aren't even supported in strict XHTML 1.0.

body {
margin: 0;
margin-bottom: 2;
padding: 0;
}or something along those lines.

Mhtml
12-18-2002, 08:24 AM
Lol, I thought about that as I was posting wasn't sure if anyone cared...obviously one did!

I knew that it wasn't supported in XHTML 1.0 but not that is was deprecated in html 4.01 ... The thigns you lear eh'.

ronaldb66
12-18-2002, 10:15 AM
I'm not to be credited; i checked on W3Schools. :o If you don't trust them, you can always check the official recommendation at the W3C site itself, but i find the way they decribe things somewhat cryptic at times... :rolleyes:



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum