I'm looking at making the transition from HTML tables to pure CSS layouts. So far, the one thing that eludes me is how to layout a page properly.
I can do:
- header
- left navigation
- content
- footer
So like this:
________________________
| Header |
|_______________________|
| Left | Content |
| Nav | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
|______|________________|
| Footer |
|_______________________|
However, on some pages I want to be able to divide the "content" area into something like the following:
________________________
| Header |
|_______________________|
| Left | info | info |
| Nav | | |
| | | |
| | | |
| | | |
| |______|_________|
| | Other info |
| | |
| | |
| | |
| | |
|______|________________|
| Footer |
|_______________________|
Anyone know how something like this would be done? Or even a nice website that helps with this kind of thing?
first layout preview (online demo):
html: css:Second layout preview (online demo):
html is quite similar to first layout, but we include one wrapper to#content-wrap
: css is also similar, by the way we added somecss
rules to target new div's:update: improved styles
For your content div set that a width then create three divs for the info sections.
The top two give a width and make sure they dont exceed the total of the container content. float one left and the other right.
underneath the divs add:
The css for that is:
Under the clear will be your third div which will give you that layout you want.
Add another inner table in the content column. Make this table as server (runat="server). Specify the condition in code behind file and make the table visible as false or true. Here my example contains a nested table. And i hide it when i had a specific condition via code behind file on specific events.
eg:
Code behind file:
Give one of the CSS grid systems a go. This site lists some:10 Really Outstanding and Useful CSS Grid Systems
http://grids.heroku.com/fluid_grid?column_amount=3
You can add and delete these grids.