tags:

views:

33

answers:

4

Hey there!

I was wondering how I would style the p class="visit" on the code below because it won't allow me to just use

p.class { color: white }

<div class="OW_Container">
                    <div class="text_wrap">
                    <h1>Finding Nemo</h1>
                    <p class="info">Lorem ipsum dolor sit amet, consectetur adipiscing elit. . </p>
                    <p class="visit"><a href="#">Visit the website here</a></p>
                    </div>
                    <img src="Images/Slide4.png"/>
                </div><!--end OW-->

I presume its because it's enclosed in the div class'

Thanks in advance!

+1  A: 

You don't use "class" in the css.

p.visit { color: white }

Also, you generally need to target A tags more specifically:

p.visit a { color: white }
Aidan Kane
Ah I'd put the wrong css down in my post, but thanks for your help, it worked! :)
A: 
p.class { color: white }

will color all text white in p tags with a class called class like:

<p class="class">white text</p>

Try something like:

p.visit { color: white }
lasseespeholt
A: 
.text_wrap p{color:#fff}
Webarto
A: 

What you are looking for is the cascading bit of CSS. Try:

div.class p.visit { color: white; }

That will style all p elements with class="visit" white but only inside of div.class.

Wyatt Barnett