Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CSS content tag

Status
Not open for further replies.

Cullen411

Programmer
Aug 17, 2005
89
GB
Hi, I was wondering if anyone could possibly help me on the CSS content>P tag.

Could anyone please explain exactly what the code below means?

.Content>p {margin:0px;}
.Content>p+p {text-indent;30px;}

I'm fairly sure it’s a statement in the CSS file to define the content paragraph margin and the amount of space given in the text indentation.

Would really appreciate your help on this!

Thanks in advance.

 
Code:
.Content>p {margin:0px;}

This refers to any <p> element that is a child of an element with the class name "Content".


Code:
.Content>p+p {text-indent;30px;}

This refers to, within an element called "Content", any <p> element that directly follows another <p> element.


I think! Someone please correct me if I'm wrong.

Be warned, these kinds of selectors aren't yet properly supported across all browsers. IE is particularly negligent in this respect.

Foamcow Heavy Industries - Web design and ranting
Target Marketing Communications - Advertising, Direct Marketing and Public Relations
I wonder what possesses people to make those animated gifs. Do you just get up in the morning and think, "You know what web design r
 
With difficult css selectors, SelectORacle always helps. It is fast and reliable and notices that incorrect semi-colon after text-indent that should actually be colon. Other than that, Foamy was right as usual.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top