...

View Full Version : struggling with varying div widths?



cookertron
01-30-2012, 12:02 PM
Hi everybody,

Sorry this is my first post and I'm just asking for help :( you probably see this a lot oops.

Right so here's the problem; I have a container DIV with a width of 100% (height 100px) at the top of the page. inside the container are two DIVS both floating left, one containing the title image which has a fixed width of 434px and another which I'd like to fill the up the remaining portion or the container, however that isn't a fixed pixel amount as I set the container to 100% (as mentioned before).

So in other words, the second DIV needs have a width of 100%-434px!

Any idea how to achieve this?

Does that even make sense?

Thanks for listening and sorry if this is a really boring problem, one that raises it's ugly head every ten minutes :eek:

abduraooft
01-30-2012, 12:21 PM
Any idea how to achieve this?

Does that even make sense?
Set a width and a float to the first column and then a margin-left/right(depending upon the direction of the float) to the next. See an example at http://bonrouge.com/2c-hf-fixed.php

cookertron
01-30-2012, 01:06 PM
Great, works a treat thank you!

I'll save that link in my bookmarks.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum