Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Senior Coder
    Join Date
    May 2004
    Posts
    1,464
    Thanks
    15
    Thanked 0 Times in 0 Posts

    ie not showing background image

    .mybutton{
    background-image: url(images/button.gif);
    color:#ffffff;
    font-weight:bold;
    background-repeat: no-repeat;

    width:70px;
    height:20px;
    font-size:11px;
    padding:1px;
    background-position: center top;


    }

    why would ie not show the background image while firefox does?

  • #2
    New Coder
    Join Date
    Oct 2007
    Location
    Irwin, PA
    Posts
    23
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Well for one, you don't need all the extra junk for the background tags, and I think the thing that might be causing your problem in IE is the background alignment. Try it without it, and then check out W3C schools, they got a list of attributes you can use for background alignments, but you shouldn't really need this for a button, right?

    Here would be my approach to things.. everything else seemed ok.

    Code:
    .mybutton{
    /*Way I always do backgrounds, with the quotes url('') see it below?*/
      background: url('images/button.gif') no-repeat;
      color: #ffffff;
      font-weight: bold;
      width: 70px;
      height: 20px;
      font-size: 11px;
      padding: 1px;
    }


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •