|
.:*K*:._.:*h*:._.:*A*:._.:*k*:._.:*s*:._.:*D*:._.:*e*:._.:*s*:._.:*i*:._.:*n*:. |
" Using <div> Tag To Inserting/Aligning/Formating/Positioning Contents " |
---|
Das HTML-Tag <div> ist ein Container und kann mehrere Elemente wie Text, Grafiken, Tabellen, andere DIVs usw., in einen gemeinsamen Bereich einschließen, positionieren, und allgemeine Elemente für Textbereiche mit der Hilfe von CSS nach Wunsch formatieren.
Dazu werden die Attribute class, id und style benutzt.
- Das HTML-Tag <div> läßt sich auch durch <p> oder für Inline-Bereiche durch <span> ersetzen. The <div> tag is a container and defines a division/section. It can contain and position every HTML element, or also, several elements such as text; graphics; tables; other DIVs; etc. The general text elements can be formatted as we wish with CSS rules. - Use the <div> tag to group block-elements to format them with class, id and styles. - The HTML tag <div> can be also replaced with <p> or for inline elements with <span>. |
" Aligning Text or Contents " | |
---|---|
" HTML " | " Value " |
<div id="KhAkDiv1" align="center">
|
(div = division = Bereich)
left |
align="center" Aligning The DIV. °Adding Images And Videos° |
" Formating Text Paragraph With Styles " | |
---|---|
" HTML/ INLINE STYLES (CSS) " | " CSS - HTML " |
<div id="KhAkDiv2" align="center" style="
color:Your Text Color;
font-size:10px;
font-family:sans-serif;">
|
<style> .K {Formating Text Paragraph} .KhAkDiv3 { color:Your Text Color; font-size:10px; font-family:sans-serif; } </style> <div class="KhAkDiv3" align="center"> Your Text Paragraph Here </div> |
Change the "colored values" to format your Text.
°HTML Hexadecimal Color Code° |
" Create A DIV Container " " With Width/Height, Background And Borders " |
|
---|---|
" HTML/ INLINE STYLES (CSS) " | " CSS - HTML " |
<div id="KhAkDiv4" align="center" style="width:250px; height:100px;
background-color: Your Color;
background-image:url(Your Image URL);
border:2px red solid;
color:Your Text Color;
font-size:10px;
font-family:sans-serif;
text-align:center;">
|
<style> .K {Creating Div} .KhAkDiv5 { width:250px; height:100px; background-color: Your Color; background-image:url(Your Image URL); border:2px red solid; color:Your Text Color; font-size:10px; font-family:sans-serif; text-align:center; } </style> <div class="KhAkDiv5" align="center"> Your Text/Image Tag/Contents Here </div> |
Change the "colored values" to sweet your needs. text-align:center; Aligning The Text Paragraph In The DIV-Box. °Background Properties° °CSS Border And Text Properties° |
" CSS DIV Container: POSITION " |
---|
" Einfache Beispiele Um DIVs Auf'm Profil (absolute) Zu Positionieren (top - left)" " Simple Examples Of (absolute) Positioning A DIV On The Profile (top - left) " |
|
---|---|
" CSS - HTML CODE " | " DESCRIPTION " |
<style> .K {Positioning Contents} .KhAkDiv6 { position: absolute; top: 0px; left: 0px; } </style> <div class="KhAkDiv6">
<h2> Header 2 </h2> <br>
</div>
|
|
<style> .K {Positioning Contents} .KhAkDiv7 { position: absolute; top: 0px; right: 0px; } </style> <div class="KhAkDiv7">
<h2> Header 2 </h2> <br>
</div>
|
|
Um den DIV zu positionieren, passe die zahlen von "left und top" an.
To positioning the DIV adjust the "left and top" Numbers. |
" DIV Container Auf'm Profil (absolute) Positionieren: (-/+) MARGIN / Z-INDEX (Layer) " " (absolute) Positioning A DIV Container On The Profile: (-/+) MARGIN / Z-INDEX (Layer) " |
|||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
" HTML/ INLINE STYLES (CSS) " | " CSS - HTML " | ||||||||||||||||
<div id="KhAkDiv8" style="position:absolute; left:50%; top:300px; margin-left:-350px;
width:250px; height:100px;
background-color: Your Color;
border:2px red solid;
color:Your Text Color;
font-size:10px;
font-family:sans-serif;
text-align:center;
z-index:9;">
|
<style> .K {Positioning Div} .KhAkDiv9 { position:absolute; left:50%; top:300px; margin-left:-350px; width:250px; height:100px; background-color: Your Color; border:2px red solid; color:Your Text Color; font-size:10px; font-family:sans-serif; text-align:center; z-index:9; } </style> <div class="KhAkDiv9"> Your Text/Image Tag/Contents Here </div> |
||||||||||||||||
|
" DIV Container - Überschneidungen " " DIV Container - Overlapping " |
|
---|---|
" HTML/ INLINE STYLES (CSS) - CODE " | " OUTPUT / EXAMPLE " |
<div id="KhAkDiv10" style="position:absolute; width:200px; height:100px; z-index:2; background-color: 0D6D6F; border: 1px solid #8FD8D8; left: 450px; top: 170px"> KhAkDiv10 z-index:2; </div> <div id="KhAkDiv11" style="position:absolute; width:200px; height:100px; z-index:1; background-color: 119194; border: 1px solid #AEEEEE; left: 550px; top: 220px"> KhAkDiv11 z-index:1; </div> |
KhAkDiv10
z-index:2;
KhAkDiv11 z-index:1; |
" CSS Eigenschaft: overflow " " CSS overflow Property " |
|||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
" DESCRIPTION " | " POSSIBLE VALUES " | ||||||||||||||||
Mit dem CSS Eigenschaft "overflow" kannst du aus jedem Container ein Scrollbarer Box machen. Sie legt fest, wie ein Bereich oder ein Element, der innerhalb eines anderen Elements definiert wird, angezeigt werden soll. Z.B. wenn der Inhalt des inneren Elements großer ist, als die Abmessungen des <DIV>-Bereichs.
The overflow property sets what happens if the content of an element overflow its area. The overflow property decides what to do if the content inside an element exceeds the given width and height properties. Eg. in a </div>-Container. |
|
||||||||||||||||
Copyright 2006-2008 by KhAk |