SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    Drop em if you got em
    Join Date
    May 2003
    Location
    NY
    Posts
    691
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Mozilla browsers not liking image background color

    I'm trying to give my images some padding, a background color and a border. They're all links, so a:hover switches the background color to give it a nice mouseover/highlight effect. However, in FireFox and other Mozilla-based browsers, the background/border is going around the image. It's basically acting as though no image is there height-wise (but correct width-wise).

    Here's the css:
    Code:
    #somepics {
    	vertical-align: top;
    	padding: 5px 10px 5px 0px;
    	text-align: center;
    	font-family: Verdana, Arial, Helvetica, sans-serif;
    	text-transform: uppercase;
    	font-size: 11px;
    	line-height: 14px;
    	font-weight: bold;
    }
    #somepics a{
    	padding: 3px;
    	background-color: #999999;
    	border: 1px solid #333333;
    	color: #535353;
    }
    #somepics a:hover{
    	background-color: #666666;
    }
    Hoping someone can lend a brain, thanks.

  2. #2
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,236
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Can we see an example of it in action? Also, try styling #somepics a img instead of #somepics a. That might help out .

  3. #3
    Drop em if you got em
    Join Date
    May 2003
    Location
    NY
    Posts
    691
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Tried #somepics a img, no difference unfortunately. * edit - correction - I was using the wrong class when editing, silly me. The outcome of using: #somepics a img is this - Things worked properly in FireFox, and didn't look buggy in IE, but a:hover img did not work in IE. Taking the img out from after a:hover did not make it work in either browser.

    I'll try and get a sample up in a bit, connection here at work today seems to be like we're sharing a dial-up :|


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
  •