Hi why is it that the button images show up in firefox, opera, safari and not IE 7 or 6 for the following code? <input name="button" class="subscribe" type="submit" value=""> Code (markup): input.subscribe{ height: 15px; width: 80px; margin: 0 0 0 4px; padding: 0; border: none; background-image:url(../images/subscribe.gif); cursor: pointer; } Code (markup):
be more helpful if you would provide the full markup and style sheet or at least link us to it because the problem could be somewhere else in your code..
Hi Here's the code <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <style type="text/css"> .newsletter{ position: absolute; left: 125px; top: 0; height: 15px; width: 170px; padding: 0; margin:0; } .newsletter input.test{ position: absolute; top: 0; left: 0; margin:0; padding: 0; height: 11px; width: 100px; font-size:10px; } .newsletter input.subscribe{ position: absolute; top: 0; left: 100px; height: 15px; width: 60px; margin: 0 0 0 4px; padding: 0; font-size: 9px; border: none; background-image: url(images/button.gif); cursor: pointer; } </style> </head> <body> <div class="newsletter"> <input class="test" type="text" name="email" size="20" > <input name="button" class="subscribe" type="submit" value=""> </div> </body> </html> Code (markup): Here's the linkhttp://www.ahzhou.com/button/button.html
I am not sure about the original code, but in the full page code you have provided, the image does not exist. background-image: url(images/button.gif); should be background-image: url(images/subscribe.gif);
Hey, I figured it out for you. For .newsletter input.test, add: border: 1px solid #ccc; /* Feel free to edit the color. */ Code (markup): Must specify border in explorer, otherwise nothing shows up. Firefox and Opera automatically add a border, causing this 'issue.' For .newsletter input.subscribe, replace: background-image: url(images/subscribe.gif); Code (markup): with: background: url(images/subscribe.gif) no-repeat 0 0; Code (markup): Goodluck to you!