Log in

View Full Version : Top + Bottom?



loserWILL
16-12-2007, 05:15 PM
Well, I'm coding a layout for somebody. It's basically done, except for one thing.

I want it so the content box stays attached to the bottom and top. I tried bottom: 0px; but that didn't work, it just moved the content down to the bottom.

Here is the CSS for it, if anybody could edit it, it'd mean a lot. +rep too.

#content {
background-image: url(images/content.gif);
width: 630px;
margin-left: 20%;
margin-right: 20%;
}

Ini
16-12-2007, 05:19 PM
Erm.. i think you need,




body {
margin-top: 0px;
margin-bottom: 0px;
}


If you put it in with the css for content box it will just move it, it has to be the page margin not the Div's margins

loserWILL
16-12-2007, 05:26 PM
No, that doesn't work.

I want it so the content box, no matter how little content, the bottom sticks to the bottom of the page, and the top sticks to the top of the page.

Ini
16-12-2007, 05:27 PM
No, that doesn't work.

I want it so the content box, no matter how little content, the bottom sticks to the bottom of the page, and the top sticks to the top of the page.

#content {
background-image: url(images/content.gif);
width: 630px;
height: 100%;
margin-left: 20%;
margin-right: 20%;
}


??

loserWILL
16-12-2007, 05:34 PM
#content {
background-image: url(images/content.gif);
width: 630px;
height: 100%;
margin-left: 20%;
margin-right: 20%;
}
??

That's my original code..?

Aflux
16-12-2007, 05:37 PM
margin: 0 0 0 0px;
height: 100%

bing bong bang.

Frog!
16-12-2007, 05:37 PM
That's my original code..?
He had, "height: 100%;".

Ini
16-12-2007, 05:39 PM
That's my original code..?
I added height in save you writing it lol

Should of said lol

Invent
16-12-2007, 05:40 PM
My method doesn't work in IE as it's rubbish.

If you want it, I'll post it. *Text Removed*

Edited by opensourcehost (Forum Super Moderator): Please do not accuse/name others of ripping.

loserWILL
16-12-2007, 05:42 PM
My method doesn't work in IE as it's rubbish.

If you want it, I'll post it.

If you could post it, that'd be great.

Also, the content box is under a header, and when I put height: 100%; it makes the content stretch up past the header.

Invent
16-12-2007, 05:43 PM
Actually, I'm thinking you want this as you're coding the layout that was basically copied from my layout.

Nevermind ;)

P.S: Yes I'm mean and pathetic ^_^

loserWILL
16-12-2007, 09:44 PM
Actually, I'm thinking you want this as you're coding the layout that was basically copied from my layout.

Nevermind ;)

P.S: Yes I'm mean and pathetic ^_^

I haven't copied anything from you.

I'm actually coding a layout for Blazz. Does anybody know the CSS to do this?

Want to hide these adverts? Register an account for free!