HTML CSS divs - horizontally stretchable div question? I'm just learning page layout using Divs, and am trying to fully learn absolute and relative positioning.
I was able to make a non-stretchable div aligned to the left side of the page (by default), and then, with absolute alignment, placing another div exactly to the right of it and giving it a width of 100% so it would stretch and occupy the remaining space to the right (if the user changes the size of the browser window). Fine, it works and was pretty simple.
But how do I do the exact same thing but flipped around? I want the left side of the page to have a div that stretches horizontally, and perfectly flush with that div I want a non-stretchable div to the right, touching the right side of the browser.
Example pic:
http://img62.imageshack.us/img62/4003/divstre.png
So, the blue and red should always be touching the far right of the browser, with no gaps. The yellow div will stretch horizontally if the browser is stretched bigger or smaller, but the blue and red divs should have fixed widths and always stay exactly the same size.
In the actual site, the red part is an image (80px high 40px wide)and the blue part is just a blank div with a background color and no text or image, but it should be 80px high and 20px wide (and not stretchable).
How can I do this? Can I do it without "floating".
Thanks |