471,896 Members | 2,165 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,896 software developers and data experts.

Creating CSS border around images

Im trying to create a border around my images that is about 6px of white and then a 1px grey border around that. Im using:

background-color: #ffffff;
padding: 6px;
border: 1px solid #dfdad4;

This works great in Firefox 2 but it doesnt work at all in IE. Does anybody have any ideas on how I could make this work?
Aug 8 '07 #1
4 1774
7,435 Expert 4TB
Which doctype are you using?
Aug 8 '07 #2
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

That is the Doctype im using. I am having trouble though changing anything in the header because Im working with DotNetNuke. So you think changing the Doctype to XHTML compliant will help?
Aug 8 '07 #3
It was the Doctype thanks alot
Aug 8 '07 #4
7,435 Expert 4TB
The doctype you used was incomplete throwing IE into quirks mode. Quirks mode is IEs original failure to comply properly with the standard and used the wrong method for determining the width and height of elements. Using a proper doctype makes sure IE follows at least that part of the standard.
Aug 8 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

15 posts views Thread by Oliver | last post: by
7 posts views Thread by Bob Bedford | last post: by
2 posts views Thread by Stephen | last post: by
reply views Thread by YellowAndGreen | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.