Forum Moderators: not2easy

Message Too Old, No Replies

Converting Table to DIV

Very basic just can't get it right.

         

zeniitti

6:25 am on Nov 3, 2008 (gmt 0)

10+ Year Member



Image tells more than 1000 words. Very basic TABLE but somehow just can't get right with DIV. Code isn't validated yet, but bare with me :)

This it the index.html file.


<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Test page</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<table width="100%" border="1" cellpadding="0" cellspacing="0">
<tr>
<!-- this TD contains 100% width area height of 127px with background. Also image top of back ground -->
<td style="background-image: url(img/bar.png);" height="127" colspan="3" align="center"><img src="img/top_logo.png" width="606" height="127" /></td>
</tr>
<tr>
<!-- This TD is only the space left hand side of content box. -->
<td rowspan="3"></td>
<!-- This TD contains content box header background -->
<td style="background-image: url(img/top_content.png);" height="84" width="606" align="center"></td>
<!-- This TD is only the space right hand side of content box. -->
<td rowspan="3"></td>
</tr>
<tr>
<!-- This TD is the content box. -->
<td style="background-image: url(img/back_content.png);" width="606">
<p>All content goes to this TD.</p>
</td>
</tr>
<tr>
<!-- This TD contains content box footer background -->
<td width="606" height="37" align="center"><img src="img/bottom_logo.png" width="606" height="37" /></td>
</tr>
</table>
</body>
</html>

style.css

body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-image: url(img/tausta_puu.jpg);
}
body,td,th {
font-family: Georgia, Times New Roman, Times, serif;
color: #333333;
}
p {
padding: 0 20px 0 20px;
}

Edit: CODE tags doesn't seem to work right on this board...
Edit2: Just readed guideline for postin *blushes* no screenshots. Well check the code, it should give the idea.

[edited by: eelixduppy at 6:34 am (utc) on Nov. 3, 2008]

[edited by: swa66 at 12:37 pm (utc) on Nov. 3, 2008]
[edit reason] tidying up [/edit]

swa66

12:51 pm on Nov 3, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



So what do you want to have it look like (in words)?

You want the main body of your page centered, 606 px wide?

Except for the header that you want to use full width and to the left with a graphic running all the way to the right ?

The main body should also have a graphical header and footer?

You want no text that can be indexed in headers and footers on top of the graphics?

Maybe it's better that you post the table free version of it (if that's you goal ?)

zeniitti

8:30 am on Nov 5, 2008 (gmt 0)

10+ Year Member



Well, I'll stick with tables. Not enough time to convert this.