Typical Webpage
Typical Webpage
STYLE
SHEETS
Typical Web Page (HTML-CSS)
<body>
<div class="header">
</div><!-- .header -->
<div class="content">
</div><!-- .content -->
<div class="sidebar">
</div><!-- .sidebar -->
<div class="clear"></div>
<div class="footer">
</div><!-- .footer -->
</body>
</html>
CSS
CODING: body { margin:0; padding:0; }
.wrap {
width:980px;
margin:0 auto;
}
.header {
height:140px;
margin-bottom:15px;
background-color:#0d7963;
}
.content {
width:690px;
height:450px;
background-color:#0d7963;
float:right;
}
CODING: CSS
.sidebar {
width:275px;
height:450px;
background-color:#0d7963;
float:left;
}
.footer {
height:70px;
margin-top:15px;
background-color:#0d7963;
}
.clear {
clear:both;
}
HEADE
R
A header is usually located at the top of the
website (or right below a top navigation
menu). It often contains a logo or the website
name:
Example
:.header {
background-color:
#F1F1F1;
text-align: center;
padding: 20px;
}
CODING:
RESULT:
NAVIGATION
BAR
A navigation bar contains a list of links to
help visitors navigating through your website:
Example
:
/* The navbar container/* Navbar links */ /* Links - change color
*/ .topnav a { on hover */
.topnav { float: left; .topnav a:hover {
overflow: hidden; display: block; background-color:
background-color: color: #f2f2f2; #ddd;
#333; text-align: center; color: black;
} padding: 14px 16px;}
text-decoration: none;
}
CODIN
G:
RESULT:
Content
The layout in this section, often
depends on the target users. The
most common layout is one (or
combining them) of the following:
• 1-column (often used for mobile
browsers)
• 2-column (often used for tablets
and laptops)
• 3-column layout (only used for
desktops)
Content
The layout in this section, often
depends on the target users. The
most common layout is one (or
combining them) of the following:
• 1-column (often used for mobile
browsers)
• 2-column (often used for tablets
and laptops)
• 3-column layout (only used for
desktops)
Content
The layout in this section, often
depends on the target users. The
most common layout is one (or
combining them) of the following:
• 1-column (often used for mobile
browsers)
• 2-column (often used for tablets
and laptops)
• 3-column layout (only used for
desktops)
CODIN
G:
CODIN
G:
CODIN /* Create three equal columns that floats next to each other */
.column {
float: left;
G: width: 33.33%;
padding: 15px;
}
G: <a href="#">Link</a>
</div>
<div class="row">
<div class="column">
<h2>Column</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
</div>
<div class="column">
<h2>Column</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit..</p>
</div>
<div class="column">
<h2>Column</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscinm magna tristique.</p>
</div>
</div>
<div class="footer">
<p>Footer</p>
</div>
</body>
</html>
Unequal Columns
• The main content is the biggest and the most important
part of your site.