SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Wizard
    Join Date
    Dec 2004
    Location
    USA
    Posts
    1,407
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    <a href="" style="display: block;" works in FF but not IE

    I want it so if you click anywhere in this LI tag, not just over the "MySite" link, it will take you to mysite.com. The code below works in Firefox but not IE.

    Any ideas how to fix in IE?

    <li><a href="mysite.com" style="display: block;">My Site</a></li>

  2. #2
    SitePoint Wizard
    Join Date
    Dec 2004
    Location
    USA
    Posts
    1,407
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    added width: 100% and it worked in IE. something in this nav section was causing it not work as it shold.

    thanks everyone

  3. #3
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,476
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sounds like the infamous "hasLayout" issue with IE. As you noted, adding a width to the element fixed the problem.

    Also, please do not use inline styles. They're very messy, look unprofessional, and will over-ride any styles that you apply to the same elements in an external or embedded stylesheet.


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
  •