KOMPX.COM or COMPMISCELLANEA.COM   

CSS centering <hr />

CSS centering <hr />, if its width is less than 100%. Horizontal centering. Example:


HTML code:


<hr />

CSS code:


hr {width: 50%; margin: 0 25% 0 25%;}

Note: mostly it works both with float:left and float:none. But float:left makes it for sure.

Browser support
Windows
Internet Explorer 4.01 and 8.0+
Firefox 1.0+
Google Chrome
Opera 3.5 - 4.0 and 7.0+
Safari 3.1+
SeaMonkey 1.0+
Mozilla 0.6+
Netscape 4.04+
Linux
Firefox 1.0+
Google Chrome / Chromium
Opera 7.0+
SeaMonkey 1.0+
NetSurf 3.0+
Hv3
Mozilla 0.6+
Netscape 4.04+
More