Tuesday, January 25, 2011

DIV

DIV elements are used for HTML document within large chunks of supplying content structure and background elements. DIV the start tag and the end tag between all the content is used to form that block, which contains elements by DIV tag attributes properties to control, or by using stylesheets format this block to control.
CSS unit location and level - div tags
As we all know, on a web site use HTML positioning text and image is a "it hurts" thing. We must use form labels and implicit GIF images, and even this will not guarantee the precise positioning, because of different browsers and operation platform will make shows results change.
And CSS can make you see ray of hope. Today we will learn by using CSS attributes, you can accurately set elements of the position, still can will locate elements together in above each other, and... But... You yourself slowly see!
Cascading Style Sheets (CSS) DHTML foundation. CSS sets on your page elements is how to display. Cascading Style Sheets (CSS Positioning - P) is one of the extension, it CSS is used to control anything on the web page or say in the window of the position. Please remember this two terms: CSS and CSS - P.
Use DIV tags
When we use CSS - P, we mainly to use it on DIV (division) meta. When you take your text, images, or other on, it can be said DIV as "DIV which", or "DIV element" or "CSS - layer", or simply call "layer". The Chinese we call it "level". So, when you see these nouns after you know they refers to a period in DIV HTML.
Use the method with the use of other DIV meta method is the same: a DIV at.this meta.
If used alone DIV and not add any CSS - P, then it in a web page effect and use is the same.
But when we put the CSS - P to use DIV after, we can strictly set its location. First we need to give this can be CSS - P control DIV an ID or say the name of it. For example, we give the following DIV name is truck. Give name is the purpose of our future usable JavaScript to control it, for example, move it or change some of its properties, etc.
What is a truck
Given hierarchical name is optional, name can be any English letters and Numbers, but first must be alphabetic. There are two kinds of the CSS - P application to DIV method.
Inline CSS: Inline is the most commonly used methods. What is a truck.
External STYLE meta: use External method, the result is the same. We will in future course in more detail explain this method. Now we mainly discuss Inline method. Please note that the External approach, in the STYLE of the ID and the relationship. DIV
< STYLE TYPE = "sites/CSS" >
<! - # truck {styles - > 'roll}
< / STYLE >
What is a truck.
Cross - is clicked CSS properties:
The main purpose of this course is to let you write pages in NS4 and IE4 can work, so we are mainly discussed in both those who are universal properties. These properties are consistent with the W3C standards.
Meta decision DIV them how is placed. "Relative" means DIV position is relative to other meta and "absolute" mean DIV meta position is relative to its place of window.
Relative to the window to the left of the left position
Top relative to the window top position
Width DIV meta width. All in the text or HTML DIV are inside.
It DIV meta height. This property seldom use unless you want to Clip level.
Clip gives layer of clipping (see) part. Clip can make DIV show for a can be defined the very accurate squares. You can use the following four values to give this square in DIV location and size.
Clip: rect (top, bottom, left and right),
Visibility concealment or demonstrate DIV according to its value "radiation", "what", inherit ".
Z - index DIV meta three-dimensional position. The value of the position is higher. DIV
I color DIV background color.
Layer - I color Netscape DIV background colour.
I add a DIV background images.
Layer - I add Netscape DIV background images.
HTML < div > tag
Definition and usage
< div > definable document with the division or section (division/sections).
< div > tag can be the document is divided into independent, different parts. It can be used as strict organization tool, and do not use any format with its associated.
If use id or to mark < div > scale-up, then this tag role will become more effective.
usage
< div > is a block-level elements. This means that its contents automatically start a new line. In fact, newlines is < div > inherent unique format performance. The < div > through scale-up or id application extra style. Don't for each < div > all plus class or id, though it has some advantages.
Can the same < div > element scale-up or id properties, application but more often used only one of a kind. The main difference is this both for element, scale-up groups (similar elements, or can be understood as one kind of element), and id used to identify individual only element. 

No comments:

Post a Comment