Can I use any tag that will allow me to place a line <hr />
on a specific left margin size
views:
132answers:
2uau...thanks :)
2009-07-28 09:37:50
+1
A:
tag. This would be a example for a solid line with a margin of 5 px to the top and bottom and 10px to the left and right:
I would prefer to use a div and add a border to that div. It's more flexible than the
tag. This would be a example for a solid line with a margin of 5 px to the top and bottom and 10px to the left and right:
<div style="border-top:1px solid #000;margin:5px 10px;"></div>
I haven't tested it but that should work fine :)
edit: i tested it with firebug and edited the code above.
Gushiken
2009-07-28 09:38:27
Support this answer - there is no way to make the HR behaviour identical in all browsers (with standards hacks like *html), so you should prefer DIV with border in all cases. For DIV case for IE6-IE7 browsers you also may need to specify font-size: 0px; line-height: 0px;
se_pavel
2009-07-28 15:14:45