Ring ring
ADS By Strikecoded:
Smash Your 2018/19 Jamb, Waec, Neco With CAMPUSBASE Visit Now.. Best Java, Android Games, Apps


No1. Naija Awarded Download Portal For Both Mobile And Pc Users..

Home | Blog | Search | Uploads

»Css Tutorials
You are viewing Tutorial 5 Of 18 Tutorials For Css Basics/Functions. View All Tutorials

»All Tutorials Collection


Tutorial 1: Introduction to CSS

Tutorial 2: CSS Syntax

Tutorial 3: CSS Classes

Tutorial 4: CSS IDs

Tutorial 5:CSS Divisions

Tutorial 6: CSS Spans

Tutorial 7: CSS Margins

Tutorial 8: CSS Padding

Tutorial 9: CSS Text Properties

Tutorial 10: CSS Font Properties

Tutorial 11: CSS Anchors, Links and Pseudo Classes

Tutorial 12: CSS Backgrounds

Tutorial 13: CSS Borders

Tutorial 14: CSS Ordered & Unordered Lists

Tutorial 15: CSS Width and Height Properties

Tutorial 16: CSS Classification

Tutorial 17: CSS Positioning

Tutorial 18: CSS Pseudo Elements

Tutorial 5: CSS Divisions

Ok so you have finished the first 4 chapters in my series. You have learned the very basics of CSS, how the syntax works and a bit about classes and IDs. Now we are gonna take a quick break from CSS and focus on the (X)HTML side of using it.


Divsions
Divisions are a block level (X)HTML element used to define sections of an (X)HTML file. A division can contain all the parts that make up your website. Including additional divisions, spans, images, text and so on.
You define a division within an (X)HTML file by placing the following between the <body></body> tags:

<div>
Site contents go here
</div>


Though most likely you will want to add some style to it. You can do that in the following fashion:
<div id="container">
Site contents go here


The CSS file contains this:

#container{
width: 70%;
margin: auto;
padding: 20px;
border: 1px solid #666;
background: #ffffff;
}


Now everything within that division will be styled by the "container" style rule, I defined within my CSS file. A division creates a linebreak by default. You can use both classes and IDs with a division tag to style sections of your website.
« Previous
Jump to Tutorial:
Next »


Page Statistics

DataLoads
Online1
Today's Hits 16
Total Today's Hits20
Total Hits This Week 20
Total Page Hits 9818
Total Forum Members190

Close Page Information

Go BackPromote Forum Services Members About us Terms of use Advertise News update Contact us Feedback

chart1FOLLOW US ON

FBTWG LDRS
Back to the Top

Copyright © . Theme by STRIKECODED TECH.

Desktop View