Jump to content

position:fixed


kurt.santo

Recommended Posts

Applied position:fixed to my masthead div, but then some difs underneath disappear and when you scroll the content obstructs the masthead. CSS is:

#container{width:70%;margin:0 auto;}#contentContainer{background-color:#71889F;border:#08396B thin solid;color:#FFF;}#top{background:#FFF;width:70%;color:#08396B;text-align:left;vertical-align:middle;margin:0;padding:15px 0px 15px 20px;position:fixed;}#nav{background-color:#A0B0BF;padding:10px 20px 10px 200px;text-align:right;}#main{padding:0;margin:0; position:relative;}#content{float:right;padding:20px;margin:0px;width:60%;}#subNav{float:left;padding:0px;width:20%;position:fixed;}

where container is general container, contentContainer is everything without masthead, top is area with global navigation. Main holds content and subNav... Where can I make adjustments?Kurt

Link to comment
Share on other sites

link?
The link is http://www.jalp.co.uk/testing/fixed/layout2.htm. Apart from logo (id is top), which should stay in place the rest should sit inside a border and scroll when content is longer than height. I just do not want it to go visibly up if you know what I mean. It should just disappear inside the box as such...I hope no one steels my genius colour combination. It is very unique and hope to earn a good reputation for great colour choices;-) Kurt
Link to comment
Share on other sites

look at http://cssplay.co.uk for a similar template to what you want.there are several to pick from, including a fix for ie6.
Had a look on given site. Great examples. Just for my purpose not really what I want (tried those layouts already). Stu achieves that the header stays in place with a set height and overflow on main content container for example. I did not want to create a scrollbar when the text gets too long, but instead just use the normal browser scrollbar on right side of browser window.I am just after a complete "normal" website with a header that always stays visible...Kurt
Link to comment
Share on other sites

it has been a couple of years since I worked with that page, so I'm going by memory only... the contents slips up underneath the header?without looking, if I recall correctly, you might need some padding or margin on the top of the content div.

Link to comment
Share on other sites

it has been a couple of years since I worked with that page, so I'm going by memory only... the contents slips up underneath the header?without looking, if I recall correctly, you might need some padding or margin on the top of the content div.
Does the job, great! One more question: the width of the site should always be 70%. Should I place a container around just for this purpose? Or do you guys specify for each div the width?Kurt
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...