开发者

Firefox is adding padding to rollover links in wordpress

开发者 https://www.devze.com 2023-03-04 12:39 出处:网络
I\'ve got a rollover menu hard-coded into WordPress (couldn\'t get IE to recognize the links otherwise). It works fine but there is this mysterious pa开发者_JS百科dding on all the links.I\'ve tried al

I've got a rollover menu hard-coded into WordPress (couldn't get IE to recognize the links otherwise). It works fine but there is this mysterious pa开发者_JS百科dding on all the links. I've tried all sorts of stuff - css reset, various positioning settings, adding and removing padding, changing ems to px, removing line height... Here's the site: http://circore.com/sporttours/

I assume this is the pertinent css, but it could be coming from elsewhere in the style.css file. Any help is appreciated! thanks

#menu-top { 
    background:url(images/menu-top.png);
    height: 115px;  
    width:210px;
    margin-bottom:0px;
}

#logo {
    display:none;
}

#menu-content { 
    width:210px;
    padding:0px;
    height:238px;

}

#menu-content .img {  
    padding:0px;
    margin:0px;
}

#menu-bottom { 
    background:url(images/menu-bottom.png) no-repeat;
    height: 302px;
}


You can fix it by changing this:

#menu-content .img
{  
      padding:0px;
      margin:0px;
}

to this:

#menu-content img
{  
    vertical-align: top;
}
  • I changed .img to just img. The difference is important. .img is looking for <img class="img" /> (or any element with class="img"). You're after finding all img elements, so img is what you want.
  • I can't see the need for margin: 0; padding: 0 - I assume that was merely part of your attempt to get rid of the extra space.
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号