10 February 2008

Simple DIV Table

I have created a simple example of a table generated strictly with div's and css. Unlike the css table tag, it is difficult to make one stretch dynamically with the width. This page (source) also illustrates some of the web-design techniques i had picked up.

Take a look: posts/divtabletest.htm

(Made old school.... notepad.exe)

Labels: , ,

07 June 2007

CSS Tip #1

If you have a div that needs to go the height of the entire page the way a body tag can. For instance, if you wanted one background image for the body tag and another for a div tag, like having multiple borders. I ran into this issue when setting:


#bg2
{
height:100%;
width:700px;
margin-left: auto;
margin-right: auto;
}


the height gets ignored on most browsers, make sure to include:

html, body
{
height:100%;
}

body
{
width:800px;
margin-left: auto;
margin-right: auto;
}


so if you have html head../head body div id="bg2" .../div /body /html

Labels: , , ,