Stylish optional <hr> tag?
I am looking for the style of an additional <hr> for my sidebar on my website.
How can I do this if I already have hr defined?
hr { border: solid #ddd; border-width: 1px 0 0; clear: both; margin: 22px 0 21px; height: 0; } Can I add a style?
hr.side { border: solid #ddd; border-width: 1px 0 0; clear: both; margin: 22px 0 21px; height: 0; } so html will be
<hr class="side"> ?
+7
user1676691
source share1 answer
using
hr.side { border: solid #ddd; border-width: 1px 0 0; clear: both; margin: 22px 0 21px; height: 0; } then
<hr class="side"> in css . refers to the class, and # - id
EDIT:
if you really wanted to make an inline style with style="" then it will look like
<hr style="border: solid #ddd; border-width: 1px 0 0; clear: both; margin: 22px 0 21px; height: 0;"> This last method is not really recommended, but works great if you want to override all CSS stylesheets and override the <style> </style> tags embedded in the HTML page
+15
Scott Selby
source share