Jump to content

Assigning class question


Mark_M

Recommended Posts

Hello, I'm trying to figure out why my class in div won’t work. Shouldn’t everything in-between the <div> tags take on the class? :) …see belowcss

.test a {	color:blue;	background-image:url(images/big_button_right.gif); }.test a:hover {color:green;}.test .l { left:  0; background-image: url(images/big_button_left.gif); }.test .l:hover { left:  0; background-image: url(images/big_button_left.gif); }

works

<div class="test"><a href="http://www.google.com">hggff</a><div><a class="l" href="http://www.google.com"></a><div></div>

doesnt work

<div class="test"><a href="http://www.google.com">hggff</a><div class="l"><a href="http://www.google.com"></a><div></div>

Thanks,Mark

Link to comment
Share on other sites

css:

.test a {	color:blue;	background-image:url(images/big_button_right.gif); }.test a:hover {color:green;}.test a.l:link { left:  0; background-image: url(images/big_button_left.gif); }.test a.l:hover { left:  0; background-image: url(images/big_button_left.gif); }

html:

<div class="test"><a href="http://www.google.com">hggff</a><div class="l"><a href="http://www.google.com"></a></div></div>
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...