kurt.santo Posted November 4, 2007 Share Posted November 4, 2007 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 More sharing options...
jlhaslip Posted November 5, 2007 Share Posted November 5, 2007 link? Link to comment Share on other sites More sharing options...
kurt.santo Posted November 5, 2007 Author Share Posted November 5, 2007 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 More sharing options...
jlhaslip Posted November 5, 2007 Share Posted November 5, 2007 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. Link to comment Share on other sites More sharing options...
kurt.santo Posted November 6, 2007 Author Share Posted November 6, 2007 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 More sharing options...
roondog Posted November 6, 2007 Share Posted November 6, 2007 I think you might want to use z-index to but the header on top of everything else. Link to comment Share on other sites More sharing options...
kurt.santo Posted November 6, 2007 Author Share Posted November 6, 2007 I think you might want to use z-index to but the header on top of everything else.What is a z-index and how would I apply it to place my logo on top of everything?Kurt Link to comment Share on other sites More sharing options...
jlhaslip Posted November 6, 2007 Share Posted November 6, 2007 http://www.jlhaslip.trap17.com/template/index.phplike that? Link to comment Share on other sites More sharing options...
roondog Posted November 6, 2007 Share Posted November 6, 2007 http://www.w3schools.com/css/tryit.asp?fil...=trycss_zindex1 Link to comment Share on other sites More sharing options...
kurt.santo Posted November 7, 2007 Author Share Posted November 7, 2007 http://www.jlhaslip.trap17.com/template/index.phplike that?jlhaslip, This is what I am after, cheers. I copied two lines from your css and it does what I want. It is only now that half of the text is missing from the divs, which start underneath. Why is that?Kurt Link to comment Share on other sites More sharing options...
jlhaslip Posted November 7, 2007 Share Posted November 7, 2007 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 More sharing options...
kurt.santo Posted November 8, 2007 Author Share Posted November 8, 2007 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.