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 2 of 2
  1. #1
    Senior Coder
    Join Date
    May 2004
    Posts
    1,464
    Thanks
    15
    Thanked 0 Times in 0 Posts

    2 images next to each other not floating left

    I have 2 images that should be right next to each other to form one image.

    now my problem is I have both images floating left but it is putting them one on top of each other.

    my html is:

    <div id=logo><img src="images/logo1.gif" alt="logo" width="239" height="153" border="0" align="absbottom"><img src="images/top2.gif" width="543" height="153" border="0" align="absbottom"></div>


    my css is

    #logo{
    display:inline;
    width:785px;
    height:153px;
    padding:0px;
    margin:0px;
    }
    .logo img{
    float:left;
    }

    what am i doing wrong?? please help?

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Get rid of display:inline; on #logo. It would probably be better to do something like this
    Code:
    <div id="logo"><img src="images/logo1.gif" alt="logo" width="239" height="153"></div>
    Code:
    #logo {
    width:785px;
    height:153px;
    background:url(images/top2.gif) top right no-repeat;
    }
    Oh and to tell you what you were doing wrong you used
    Code:
    .logo img{
    float:left;
    }
    When it should have been
    Code:
    #logo img{
    float:left;
    }
    ||||If you are getting paid to do a job, don't ask for help on it!||||


  •  

    Posting Permissions

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