0
If you were to use a horizontal line and want to make it a certain color, how would you also make its width different? I can't wrap my head around THIS one. for example: --<HR COLOR="#00FF00"/> This makes it green, but I can't add width in there. is there some certain way?
7 Réponses
+ 3
<hr style="width:100px;"/>
With the style="" Attribute you can do that, but it is better to make a class and define it in the CSS File.
+ 3
you can make
<hr style="color:#00FF00;width:100px;"/>
But define the Style inside the CSS File is more recommended
hr {
color: #00FF00;
width: 100px;
}
so the page will load faster.
+ 2
This is also possible.
0
crap, so I can't edit the width AND change the color?
0
you can edit four basic HTML attributes of <hr> and many more in CSS
see my code example
https://code.sololearn.com/W0FC9y2b9aei
Anyway those attributes are not supported in HTML5.
0
You would need ; semicolons to seperate the different attributes
- 1
I found another way, using strictly HTML codes. I'm not that experienced with CSS just yet. This is only my second year coding so..
here's another way:
<HR COLOR="#00FF00" WIDTH="150PX"/>