Help with some CSS layout....

Status
Not open for further replies.

5371

Ars Scholae Palatinae
1,327
I'm in the progress of rebuilding my dorms website and decided to use only style sheets, but I seem to have some trouble with the layout.

Especially the seperation of the back-ground.

concept.jpg
 

RojBlake

Ars Legatus Legionis
48,129
Subscriptor
Not 100% sure what you mean by 'fixed' in the pic above, but I had a rough stab at it anyway.

Page: here
Style sheet: here

If you resize the window it should still remain proportional. One weird thing though: in the 'centerbox' class I had the height set at '50%' initially, but it definitely was not 50% of the window, so I changed it to 100% and it works, though it shouldn't imo. Hmmm... ;)
 

RojBlake

Ars Legatus Legionis
48,129
Subscriptor
8-track:
I think the pink main content box needs to have a fixed size
If he doesn't mind having the proportions go out of whack when the window resizes then yeah, that works.

I figured out the weird 'height' thing: in the html I put the 'centerbox' class at the bottom, so it was taking its position relative to the 'topdiv' class, hence 'height: 50%;' meant 50% of 'topdiv''s height, not the window's height. Moving 'centerbox' to the top of the document makes the 50% relative to the window, so it all works as it should now. :)

Page: here
Style sheet: here
 
Status
Not open for further replies.