how i can use two style on a div <div id="span,google"></span>
views:
68answers:
2
+1
A:
You can do:
<div class="span google"></div>
where you should have .span
and .google
classes set in your stylesheet
Sarfraz
2010-05-14 07:25:50
that's not the proper syntax tho
David Hedlund
2010-05-14 07:26:10
@David: How is it not proper?
Sarfraz
2010-05-14 07:28:46
-1 for incorrect HTML
ck
2010-05-14 07:28:49
Anyone can make a small mistake like this; I think Sarfraz meant to type the correct form. Don't downvote...
Harmen
2010-05-14 07:31:48
Yes guys i did not see the last closing tag, fixed it now. Thanks you all :)
Sarfraz
2010-05-14 07:33:43
Vote changed. -1 removed.
ck
2010-05-14 07:35:39
I was referring to `span, google` instead of `span google` but I see that that's changed now as well
David Hedlund
2010-05-14 07:53:30
+5
A:
You can't assign two id's like that, but you can use two classes:
<div class="span google"></div>
Also, you can't start the element as a div
and close it as a span
as in your code. I'll write that off as a typo, tho.
.span { some-css }
.google { other-css }
David Hedlund
2010-05-14 07:25:50
It doesn't make sense to have two ids, an id already uniquely identifies an element.
CurtainDog
2010-05-14 07:34:26
id is meant to be unique to that specific tag, so you should use class instead. However, if you must associate it with two id's, then you could nest the divs: <div id="span"><div id="google"></div></div> and thus: #span {} #google {}
kainosnous
2010-05-14 08:54:39