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 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Mar 2005
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    basic - masthead div with 2 columns css - how?

    i've got a masthead div that i've created:

    #masthead{
    position: relative;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 70px;
    background-color: #000000;
    }

    straightforward.

    in my html, i spec the masthead div and have a set of 3 graphics inside it that start from the left of the masthead. i have another graphic that i want to be aligned at the right side of the masthead. (the overall effect is like a two column table, where the contents of the left side cell are left aligned, the righ side cell are right aligned.

    what is the simplest way to achieve this?

    i've tried using float and some other ideas, but these commands, while making the graphic right-aligned, drop it below, outside the masthead.

    thanks for the help.

  • #2
    Senior Coder
    Join Date
    Aug 2002
    Location
    UK
    Posts
    2,789
    Thanks
    2
    Thanked 14 Times in 14 Posts
    Do you mean something like this



    <div style="width:590px;border:1px solid black">
    <div style="font-weight: bold; float: left; width: 270px;height:30px;color: #404000; text-align:left; padding:10px"><img src="pic.jpg"><BR>
    Blah<br>Blah<br>Blah<br>Blah<br>Blah<br>Blah<br>Blah<br>
    </div>
    <div style="font-weight: bold; float: right; width: 270px;height:30px;color: #606000; text-align: right; padding:10px"><img src="pic.jpg"><BR>
    Blah<br>Blah<br>Blah<br>Blah<br>Blah<br>Blah<br>Blah<br></div>
    </div>
    The silent one.

    The most dangerous thing in the world is an idea.
    The most dangerous person in the world is the one with an idea.

  • #3
    Senior Coder
    Join Date
    Jun 2002
    Location
    The Netherlands, Baarn, Ut.
    Posts
    4,253
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Markup, CSS, images

    How do you expect anyone to give a definitive answer without the necessary information? We need the markup, the styles used, and preferably a look at the images used; a link to the page online would be best (since you cover all three with that).
    Regards,
    Ronald.
    ronaldvanderwijden.com

  • #4
    New to the CF scene
    Join Date
    Mar 2005
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    nice one

    MJ -- Thanks a lot!! i was able to stuff that code in and tweak it to fit.

    i didn't work out having to have two specific div styles with fixed widths. i think that was the secret. cheers for the help!

  • #5
    Senior Coder
    Join Date
    Aug 2002
    Location
    UK
    Posts
    2,789
    Thanks
    2
    Thanked 14 Times in 14 Posts
    Someone may still pop in with a better way of doing it but if it is sufficient for what you are wanting alls good
    The silent one.

    The most dangerous thing in the world is an idea.
    The most dangerous person in the world is the one with an idea.


  •  

    Posting Permissions

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