Advanced Search

Results 1 to 3 of 3

Thread: float:left element inside the LI had an Issue in IE browser

  1. #1
    Join Date
    Mar 2006
    Location
    Chennai
    Posts
    11
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Arrow float:left element inside the LI had an Issue in IE browser

    Hi,
    I'm having issue when I set float:left element inside LI in IE.
    There is a tnode(div,p,span) followed by link.
    ---Detailed:
    If the list (<li>) contains two (or more) block-level elements, the first element with float:left, the next block-level elements are placed below the floated element instead of next to it.
    --------------

    Code is below:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <HTML>
    <HEAD>
    <style type="text/css">
    ul
    {
    list-style:none;
    }
    .nc a
    {
    display:inline-block;
    float:left;
    }
    </style>
    </HEAD>
    <BODY>
    <ul>
    <li class="li">
    <div class="nc"><a href="">1. Test 01</a><div>Vol 01</div></div>
    </li>
    <li class="li">
    <div class="nc"><a href="">2. Test 02</a><div>Vol 02</div></div>
    </li>
    </ul>
    </BODY>
    </HTML>

    Kindly help me to resolve this issue.
    Thanks
    Thangaman
    Last edited by thangaman; 11-17-2009 at 09:55 AM.

  2. #2
    Join Date
    Jul 2009
    Location
    Binus University
    Posts
    447
    Thanks
    73
    Thanked 21 Times in 21 Posts

    Default

    sorry don't really understand what do you mean, if you just want to make the content in <a> tag u just need to include the <li> in css. Something like this:

    Code:
    <style type="text/css">
    ul
    {
    list-style:none;
    }
    .li
    {
    display:inline-block;
    float:left;
    }
    </style>
    hope this help
    _____________________

    David Demetrius // davejob
    _____________________

  3. #3
    Join Date
    Mar 2006
    Location
    Chennai
    Posts
    11
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Arrow

    Thank your for your response David,

    Realy what I need is in IE, Inner content(div) should come in the same line after a link, now its come into the next line.
    And the inner div is tnode, so we cant set any style for that.
    As I already mentioned tnode maybe div or p or span etc..
    Thanks
    Thangaman

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
  •