daveWare Posted January 5, 2006 Share Posted January 5, 2006 When dropping in a background image I've seen the code written several different ways and was wondering what the correct method is. Example 1 I believe this is how Dreamweaver writes it. background-image: url(../images/header.gif); Example 2 I've seen it written this way on the Web using double quotes. background-image: url("../images/header.gif"); Example 3 I've also seen it written this way on the Web using single quotes. background-image: url('../images/header.gif'); or does it matter?and if it does matter can I assume it applies to any property that uses url()?Thanks,Dave Link to comment Share on other sites More sharing options...
F-Man Posted January 5, 2006 Share Posted January 5, 2006 All three ways are correct. Link to comment Share on other sites More sharing options...
daveWare Posted January 5, 2006 Author Share Posted January 5, 2006 All three ways are correct.<{POST_SNAPBACK}> So it doesn't really matter. Thanks! Link to comment Share on other sites More sharing options...
Guest dinanath Posted January 6, 2006 Share Posted January 6, 2006 When dropping in a background image I've seen the code written several different ways and was wondering what the correct method is. Example 1 I believe this is how Dreamweaver writes it.background-image: url(../images/header.gif); Example 2 I've seen it written this way on the Web using double quotes. background-image: url("../images/header.gif"); Example 3 I've also seen it written this way on the Web using single quotes. background-image: url('../images/header.gif'); or does it matter? this one is correct for all brosers = background-image: url(../images/header.gif);Try this Link to comment Share on other sites More sharing options...
smiles Posted January 9, 2006 Share Posted January 9, 2006 only the third way is correct Link to comment Share on other sites More sharing options...
~Shinta Posted January 9, 2006 Share Posted January 9, 2006 The third way is best, the other two work. Link to comment Share on other sites More sharing options...
daveWare Posted January 25, 2006 Author Share Posted January 25, 2006 Thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now