Advertisement

How To Make <div> Based Website in PHP

 (Read 2651 times)

Admin

  • Administrator
  • Hero Member
  • *****
  • Posts: 1549
    • The Jucktion
How To Make <div> Based Website in PHP
« on: Jul 09, 2010, 07:34 AM »
 
Maybe you are using tables to design your website but should stop with it. Tables isn't created to make designs but to display tabular data. To create website you should use <div> tags. If you don't know how to do it read this tutorial.

1. Create container.

PHP Code:

<div id="container"></div>


2. Inside container create divs to precise structure of your website. I used here this schema:

PHP Code:

<div id="container">
<div id="menu"></div>
<div id="header"></div>
<div>
<div id="content"></div>
<div id="sidebar"></div>
</div>
<div id="footer"></div>
</div>


3. Now let's make CSS code:

PHP Code:

#container {width: 1000px;}
#container #menu {width:100%; height: 50px;}
#container #header {width:100%; height: 200px;}
#container #content {width: 75%; float: left;}
#container #sidebar {width: 25%; float: right;}
#container #footer {width: 100%; clear: both; height: 50px;}
 

Advertisement

Best Affiliate Program