Left & Right align 2 images on same line, Right Image drops to next line?

Discussion in 'HTML & Website Design' started by SFNUM8, Sep 28, 2008.

  1. #1
    I am creating a menu that needs to have a samll image left aligned followed by a small bit of text and on the same line about 10 spaces over I need to right align another small image, but with the code listed below the right aligned image is dropping to the next line and right aligning. Any ideas?

    <div id="sidebar">

    <ul class="sidemenu">

    <li><a href="Blue.html"><img src="images/logo.gif" /> LOGO </a> <img src="images/logo.gif" class="float-right" /></li>
    <li><a href="Blue.html"><img src="images/logo2.gif" /> LOGO2</a> <img src="images/logo2.gif" class="float-right" /></li>
    </ul>

    </div>



    CSS
    .float-right { float: right; }
     
    SFNUM8, Sep 28, 2008 IP
  2. Sensei.Design

    Sensei.Design Prominent Member

    Messages:
    3,847
    Likes Received:
    162
    Best Answers:
    0
    Trophy Points:
    310
    Digital Goods:
    1
    #2
    well try to give the images id'S or give the a an id and use a div for teh second image
     
    Sensei.Design, Sep 28, 2008 IP
  3. Bagi Zoltán

    Bagi Zoltán Well-Known Member

    Messages:
    364
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    110
    #3
    div#sidebar ul li {
    display:inline;
    padding-right:10px}
     
    Bagi Zoltán, Sep 28, 2008 IP