Now, Let's continue with Part 2 discuss here the following:
Creating tables
Boxing with CSS, such as layout of a web page
Here's how:
Creating tables
The tables are very useful in presenting the data. Are the following HTML tags will be used to create a simple table:
Single-column table:
Width = "400" <table "1" border = cellspacing = cellpadding "2" = "4">
<tr> <td> Series 1</ Td> </ tr>
<tr> <td> line 2 </ td> </ tr>
</ Table>
Sign at the top of mywebpage.html inside the body tag, store and update your browser. This is the table on the net. From the above HTML code that refers to the width of the entire table (you can even pixels, such as "800"), telephone line or boundary is the pattern of cellspacing table is the space betweenCells, the cells of the area in which the data are, cellpadding is the space between frames and cells. You can use the values in this table of attributes or properties as desired or necessary.
Although the table above html codes still have a job that requires W3C.org property table or attributes or CSS style sheets are defined. With CSS, the above characteristics of the table can be represented as follows:
Inside the style tag inHead:
. Type1 (
width: 400px;
padding: 4px;
margin: 2px;
)
. border (
border: 1px solid # 000;
)
Then in the body tag:
<table Class = "Typ1 Grenze">
<tr> <td> Line 1 </ td> </ tr>
<tr> <td> line 2 </ td> </ tr>
</ Table>
(Looking at the codes "Type 1" from the previous paragraph.), Ie it is a class selector.For the following types of properties or attributes of a table, you can label it as type2, type3, and then so on, or with other names that you prefer. "Limit" is also a class selector and "border: 1px solid # 000" is the thickness (1px), border-type (solid) and color (# 00F) of the border. There are more discussions on the CSS "Creating tiles CSS and Web page layout" and "Design Using CSS in your web pages"
When you receive the above, then enter the code in the style and body tag to search for, as mentioned, and save the update of the browser. It must be the same as the first.
Now we want a 2-column or multi-table column:
Width = "400" <table "1" border = cellspacing = cellpadding "2" = "4">
<tr> <td> Row 1 Data 1 </ td>
<td> Line 1 Data 2 </ td> </ tr>
<tr> <td> row 2 data 1 </ td>
<td> row 2 data 2 </ td> </ tr>
</Table>
Sign at the top of mywebpage.html inside the body tag, store and update your browser. This is the 2-column table on the net. To insert a column, then add <td> </> from <td / td>. 1 <td> </ td> is a column, 1 <tr> </ tr> is a line and 1 <table> </ table> is a table.
Now, a table with 1 main element, and can take 3Subheadings:
Width = "400" <table "1" border = cellspacing = cellpadding "2" = "4">
<tr> <td colspan="3"> mainline </ td> </ tr>
<tr> <td> Section 1 </ td>
<td> Section 2 </ td>
<td> Section 3 </ td> </ tr>
<tr> <td> Row 1 Data 1 </ td>
<td> Line 1 Data 2 </ td>
<td> Line 1 data3 </ td> </ tr>
<tr> <td> row 2 data 1 </ td>
<td> row 2 data 2 </ td>
<td> Line 2 Data 3 </ td> </ tr>
</ Table>
Sign at the top of mywebpage.html inside the body tag, store and update your browser. You see? Yes, simply use colspan to merge the columns. To use 2 columns colspan = "2 Merge" and 3 columns, use the colspan = "3" and so on.
If you use the lines mergecolspan rowspan instead. See this example:
Width = "400" <table "1" border = cellspacing = cellpadding "2" = "4">
<tr> union <td rowspan="2"> line </ td>
<td> Line 1 Data 2 </ td> </ tr>
<tr> <td> row 2 data 2 </ td> </ tr>
</ Table>
Now enter the top of mywebpage.html inside the body tag, save and update your browser. Now we see that 2Lines in your first column were combined.
Tip: Create your table with different values, in order to familiarize themselves with the handling of tables.
<b> create CSS-top boxes for Web Page Layout </ b>
First of tables as layout of a Web page is to be used. Thus, the head, the bars on the right bar on the left, main content areas and footers in a table. This slows the page load, like the browser, first table, first of allview contents. Visitors may already have left the front page can be displayed. If you want to use the table as a layout, you should avoid, with large tables. Better use of tables, so that the browser displays your site gradually but more quickly.
Although the table may still be used, requires W3C CSS boxes instead of tables for layout, are used for the issue of accessibility. CSS box will load faster than tables. These could be controlledStyle sheets, which could be among the HEAD tag or in a separate CSS file. The most important part of boxing is in the positioning CSS. So I say, the positioning properties of these boxes on my experience:
Position: absolute – you must define the axis x and y axis as a reference point of a corner of the box. X-axis is to the right or left and y axis is upward or downward. They also define the width or the left edge and right padding of the box. The box isnot affected by preceding or following fields. Similarly, the fields before or after the boxes are identified as absolutely positioned, are not affected.
float: right or left – it is necessary to set the width. You must also select whether left or right. The box will sit on the side selected. It is based on the field before him, if there is enough space for them. This is influenced by other sectors, with the exception of absolutely positioned boxes.
Any position or function: static or fixed- This corresponds to normal flow. This is also supported by other sectors are concerned but absolutely positioned. You must define the width or the left and right margins.
Now you see in the picture below, the 5 boxes, namely: headerbox, leftbox, centerbox to provide the highest investment rating and footerbox. This is the cash-box, which are automatically in width, if the display has changed the window size of the computer:
<style type="text/css">
body (
text-align:center;
margin: 1px;
)
Headerbox # (
width: 100%;
Height: 15%;
background-color: # 9cf;
border: 1px solid # 00F;
padding: 0px 0px 0px 0px;
margin: 0px 0px 0px 0px;
)
RIGHTBOX # (
float: right;
width: 20%;
margin-top: 5px;
text-align: center;
background-color: # CFF;
border: 1px solid # 00F;
Height: 100%;
)
Leftbox # (
float: left;
margin-top: 5px;
Width:20%;
text-align: center;
background-color: # CFF;
border: 1px solid # 00F;
Height: 100%;
)
Centerbox # (
width: 99%;
margin-top: 5px;
text-align: center;
background-color: # CFF;
border: 1px solid # 00F;
Height: 100%;
)
Footerbox # (
width: 100%;
text-align: center;
Height: 15%;
vertical-align: middle;
margin-top: 5px;
background-color: # 9cf;
border: 1px solid# 00F;
)
</ Style>
</ Head>
<body>
<div HEADERBOX area Id="headerbox"> content </ div>
<div LEFTBOX area Id="leftbox"> content </ div>
<div RIGHTBOX area Id="rightbox"> content </ div>
<div CENTERBOX area Id="centerbox"> content </ div>
<div FOOTERBOX area Id="footerbox"> content </ div>
</ Body>
First, the type ofHTML mywebpage.html the above in mind, style and the labels of the body, as in the previous year. Then, save and refresh your browser or open the file with your browser. 're Seeing headerbox on top, the leftbox, centerbox and least corrupt country in the middle and footerbox the end? Try changing the width of the browser window. You see? The width of the field are also adapting and if your site will be automatically assigned depending on the size settings of your browser window attendees!This is why I% s is used to determine the width of the box.
Well, let me explain the preceding code for the production of boxes, like the layout.
headerbox – preceded by #, ie there is an ID selector, and may be used only once per page; float: left means that the field is on the left side, when appropriate; width: 100% means that the Field is 100% of the browser window and that is why it is liquid, height: 15% means that the field is 15% of the browser window; text-align: center is the object orientationor characters within a window, and background-color: # 9cf the color of the space inside the box, it is border: 1px solid # 00F is like the creation of equals.
The least corrupt country – the same statements referred to above, except for the float: right, which is the box on the right and margin-top: 5px means the distance from the baseline of the field mentioned above (headerbox) thin.
leftbox – own statements above.
centerbox – own statements above, except that he does not take sidesdefined, namely that will follow the normal. It fits the space available. This is 100% or full size. Beyond this limit, distort the orientation of the field.
footerbox – align own statements above, except the vertical middle, which means that objects or characters within the window vertically aligned in the center.
Trying to get the values from the values of the boxes in front of CSS, then save. Upgrade your browser to learn andwith the effect of any change. Please note, however, that there may be slight differences, if the above CSS boxes are displayed with browsers other than Internet Explorer, Firefox and Opera.
Take part 3
Link : Top baby changing table
March 5th, 2010
admin
Posted in
Tags: 
