0
How to use the id selector
I put it in a example.css and then on my html I try it. it did not work but the class selector work. ps. I seperate my content and style
4 Respostas
0
<div id="divOne">
</div>
/****example.css **/
#divOne{
color: #FFFFFF;
background-color:000000;
}
0
yes I already try it.
html
<div id="sample">
<p> test para </p>
<p> test paragraph </p>
</div>
and the css file
#sample {color: blue; background-color: gray;}
and it wont work
0
do you linked the example.css on header of your page
0
yes. <link rel="sheetstyle" href="example.css">
and it work on class and now I try the id selector again and it work like class.
it should be <p id="sample"> so it just like a class selector