|
Related Articles + Build your own website from scratch Related Links |
Building a template file. STEP 4: CSS Styles PART I I mentioned CSS styles before, and now we are going to do them, the styles are always preferred in the header of the page that means between the <head>...</head> tags. Styles are always enclosed by <style> tags and can be written directly in the page or linked by using a *.css file. We will type them directly. <head> Though I will not explain here what does it exactly means, the above code is all the CSS styling you'll need for now. The background-color statements are there to show clearly each layer, but will be replaced in further steps to provide a better look to the page. Most of the statements are self-explanatory, but the float and clear might not be familiar to you and are very important for this layout to work. The float statement allows the layer to position itself next to the previous layer instead of beneath it, which is the default behavior. The attribute left and right just declare the alignment of the layer with respect to the others. The clear statement is used to make the footer go beneath the columns. Since they use the float statement, without the clear one the footer layer would go under the columns. If you want to see, take it out and play with the code. |
Affiliates |