By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,919 Members | 1,625 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,919 IT Pros & Developers. It's quick & easy.

Div tag

P: 27
Could someone tell what Div does and use it in a example?
Sep 29 '06 #1
Share this Question
Share on Google+
3 Replies

Expert 100+
P: 1,071
In this example, the selector matches any p element that is the first child of a div element, and indents the first paragraph inside a div element:

div > p:first-child

This selector will match the first paragraph inside the div in the following HTML:

First paragraph in div.
This paragraph will be indented.
Second paragraph in div.
This paragraph will not be indented.

but it will not match the paragraph in this HTML:

The first paragraph inside the div.
This paragraph will not be indented.
Sep 29 '06 #2

P: 5
It creates a layer - that overlaps other layers.-is used in DHTML.
--Know nothing else
Sep 30 '06 #3

Expert 5K+
P: 7,435
There is no such thing as a 'layer' in html and divs do not necessarily overlap and, in most cases, don't overlap. A div is used to help structure a html document. It can be used to contain groups of related elements. That is its only purpose.
Oct 2 '06 #4

Post your reply

Sign in to post your reply or Sign up for a free account.