Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jan 2012
    Posts
    4
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Exclamation struggling with varying div widths?

    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

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,853
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    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
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • Users who have thanked abduraooft for this post:

    cookertron (01-30-2012)

  • #3
    New to the CF scene
    Join Date
    Jan 2012
    Posts
    4
    Thanks
    2
    Thanked 0 Times in 0 Posts

    [solved]

    Great, works a treat thank you!

    I'll save that link in my bookmarks.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •