Forum Moderators: not2easy

Message Too Old, No Replies

different reference for elements in one div

         

bluecorr

7:56 am on Mar 15, 2004 (gmt 0)

10+ Year Member



Hi!

I have

div.content and I want all p, h1, h2, h3 in it (and only them) to have a left margin of 300px. Up until now I thought this could be achieved through

div.content h1, h2, h3, p {
margin-left: 300px;
}

But it only works for H1 and not for the rest. Any idea how I could solve the problem? If I remove the commas again it doesn't work.

Thanks.

bill

7:58 am on Mar 15, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



try this

div.content h1, div.content h2, div.content h3, div.content p {
margin-left: 300px;
}

bluecorr

5:08 pm on Mar 16, 2004 (gmt 0)

10+ Year Member



Thanks, it worked:). Sorry about the delay in replying.