+2 html css D...">

How to use two css styles in a div or span

how can i use two styles on a div <div id="span,google"></span>

+2


a source to share


2 answers


You cannot assign two IDs, but you can use two classes:

<div class="span google"></div>

      



Also, you cannot start an element like, div

and close it like span

, like in your code. I'll write this as a typo, tho.

.span { some-css }
.google { other-css }

      

+7


a source


You can do:

<div class="span google"></div>

      



where you should have classes .span

and .google

set in your stylesheet

+1


a source







All Articles