<hr> and Abstände

Status
Nicht offen für weitere Antworten.

wachteldonk

Erfahrenes Mitglied
Hallo,

ich kann im Firefox di Abstände von <hr> mit margin verändern aber der IE7 ist das egal:( Weis jemand wie man das sonst anpassen kann?
 
Hi,

versuch es mal mit einem Conditional Comment für den IE. Dort kannst du die horizontale Linie gezielt
für den IE formatieren.
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
  "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>www.tutorials.de</title>
<meta name="author" content="Quaese">
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">

<style type="text/css">
<!--
*{ margin: 20px; padding: 0; font-size: 12px;}
body{ background: #fff;}

p{ margin: 0;}

.testHR{ margin: 2px 0;}
//-->
</style>
<!--[if IE]>
  <style type="text/css">
.testHR{ float: left;
         margin: 2px 0 -13px 0;
         display: block;}
  </style>
<![endif]-->

</head>
<body>
<p style="background: #f00;">Eins</p>
<hr class="testHR">
<p style="background: #0f0;">Zwei</p>
</body>
</html>
Ciao
Quaese
 
Status
Nicht offen für weitere Antworten.
Zurück