iGuest 3 Report post Posted January 3, 2005 Hello. I have this specific situation i'd be mighty glad if anyone could help me with.I have this top bar sort of thing for a site.I need it to begin say 240 pixels from the left and 180 from the top. It's 73 pixels high. And the width - i want it to continue from the beginning (240 from right edge) all the way to the left edge. That is, i want it to scale with the window width.How do i do it? Everything i've tried so far has resulted in something buggy. Share this post Link to post Share on other sites
iGuest 3 Report post Posted January 3, 2005 Hello. I have this specific situation i'd be mighty glad if anyone could help me with. I have this top bar sort of thing for a site. I need it to begin say 240 pixels from the left and 180 from the top. It's 73 pixels high. And the width - i want it to continue from the beginning (240 from right edge) all the way to the left edge. That is, i want it to scale with the window width. How do i do it? Everything i've tried so far has resulted in something buggy. Don't you mean 240 from the left edge to the right edge? Hmm I'll have a think about this. I'll try some code out, hopefully I'll get it. skyglow1 Share this post Link to post Share on other sites
iGuest 3 Report post Posted January 3, 2005 Ok I've thought of a way. Here is the code:test.html: <HTML> <HEAD> <TITLE> Test for payl </TITLE> <LINK rel="stylesheet" type="text/css" href="default.css" title="default"> </HEAD> <BODY> <DIV id="container"> <DIV id="topbar"> <FONT color="#FFCC33"> Content Content Content </FONT> </DIV> </DIV> </BODY></HTML> defualt.css:#container { position:absolute; top:0px; left:0px; width:100%; height:100%; background-color:#000000; overflow:hidden; }#topbar { position:absolute; top:180px; left:240px; width:100%; height:73px; background-color:#222222; } Ok how it works is everything in the website page is put into a DIV which is lik ethe master container. This DIV has the property that if something goes over its width, it will clip it and cut it off so you can't see it. THe topnav DIV is of width 100% and it overflows its container DIV, but using the overflow attribute this part of the DIV cannot be seen.Here is the code in working:http://forums.xisto.com/Ask if you need any modifications.skyglow1 Share this post Link to post Share on other sites
iGuest 3 Report post Posted January 3, 2005 Thanks mate, got it working. You rule :DI've been having trouble with mozilla all along with this project. IE (6.0) shows everything the way i want, pretty muc.Mozilla (1.0) creates weird things.It continues the contents of this div (in this case a bacground image 76 pixels high) outside the div underneath it for some distance. The same thing happens to a similiar design i have for the sides. Would you have any ideas what this is about? Should i supply screenshots?EDIT:Oh, i figured it out. When i added the background-repeat properties (wich i concluded as IE was showing it correct anyway weren't necessary), it all went good.So thanks mate. Share this post Link to post Share on other sites
iGuest 3 Report post Posted January 4, 2005 No prob dude, I love doing CSS :Dskyglow1 Share this post Link to post Share on other sites
iGuest 3 Report post Posted January 6, 2005 Okay, i'm back. The same layout still. This time i have pretty much the same thing, only vertical. Begins from a certain point from the top set with absolute. Has a set width. I want it to stretch to the end of the whole thing. I have a third div for the contents and so far i havent been able to make it so that when the contents div is stretched to longer than one screen in height, the left bar stretches along with it.How do i do it?Do you need any extra material? Share this post Link to post Share on other sites
iGuest 3 Report post Posted January 6, 2005 Oooh I'm not too good with heights, I had this same problem on my website. Um, how did you get the content div to stretch vertically in the first place? I think you should have a set heigh on your website which wil suit all pages in height, but it may be like 2 page heights in lenght, or a set pixel value like 1000px in height.. Then, you can set the vertical div to 1000 in height as well, and use the hidden thing.I will try to play around with the stretching, I just need to know how to make it stretch along.skyglow1 Share this post Link to post Share on other sites
iGuest 3 Report post Posted January 7, 2005 I got it to do it by putting the 100%*100% div olnly around the div that i wanted to clip.All the rest is not in the clipping div and can do what it wants, so to speak. Share this post Link to post Share on other sites
iGuest 3 Report post Posted January 7, 2005 Can I see the current code you have? That would make things easier.skyglow1 Share this post Link to post Share on other sites
iGuest 3 Report post Posted January 8, 2005 Oh crap. I posted here yesterday but it seems it didnt upload somewhy.Anyway.The code for now is up at http://payl-test.blogspot.de/ for testing purposes . Just see the source. Share this post Link to post Share on other sites
iGuest 3 Report post Posted January 10, 2005 Ok so you need the left bar to stretch all the way to the bottom of the page? Just asking how you can see if its stretch to the bottom, can you edit the code so that there's a visible way you can see its stretched to the bottom.Hmm I'm thinking setting the <DIV id="content"> to about 1600 height, then if the content exceeds this height you get a scroll bar with overflow:scroll, would that be ok? Then the left bar has the same height too.If you want to stretch then I'm stumped how to do that sorry.skyglow1 Share this post Link to post Share on other sites