Classes with p and text indent

liunx

Guest
hey all,

im using php, but thats not to wry, and im just trying to make it so it will indent the text in p tags with a class="b". i have:

#context.b p
{
text-indent:1.5em;
}

and on the page, i have(in context div):

<p class="b">
indent text
</p>

and it doesnt work. ive never really used class's before, can anyone lend me a little help:p, thx!if you want it to be class use

.context.b p
not
#context.b p#context.b p
{
text-indent:1.5em;
}


:confused: What's this? Classes, like ids, come after the element. So:

p.b {
text-indent:1.5em;
}

Now, if you want to style class b in div id context differently from other class b 's, then you can do:

#context p.b {
text-indent:1.5em;
}

But if you want all class b the same, just use the prior example.

Edit: lakers01, what you gave makes no sense :confused:worked great ..thx:D
 
Back
Top