View Full Version : Firefox Spacing Problem
Geologist1724
01-08-2009, 01:40 PM
Is there a way to insert a <p> or </br> but only for IE, especially IE 7.0. I don't want FF to read it.
Snookerman
01-08-2009, 02:41 PM
Sure, use conditional comments:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>
<body>
<p>
Everyone can see this
</p>
<!--[if IE 7]>
<p>
Only IE7 users can see this
<br>
That's right
</p>
<![endif]-->
</body>
</html>
These are especially useful when you need different styles for IE, you can then put a link to a stylesheet between the conditional comments. Take a look at this article for more info:
http://msdn.microsoft.com/en-us/library/ms537512.aspx (http://msdn.microsoft.com/en-us/library/ms537512.aspx)
Good luck!
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.