Connecting Tech Pros Worldwide Help | Site Map

replace table w/ div tag. how?

jaYPee
Guest
 
Posts: n/a
#1: Sep 28 '05
anyone know how can I replace this code using only the div tag? I have
tried everything but I can't do it.

here's the code using table:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
<title>Untitled Document</title>
</head>

<body>
<table width="799" align="center" style="border:1px solid #999999">
<tr>
<td><div id="sidebar" style="border:1px solid #999999; width:
160px; float:left">
<h2>sidebar</h2>
<ul id="nav">
<li><a href="#">Test Link One</a></li>
<li><a href="#">Test Link Two</a></li>
<li><a href="#">Test Link Three</a></li>
<li><a href="#">Test Link Four</a></li>
<li><a href="#">Test Link Five</a></li>
</ul>
<p>Additional sidebar content.</p></div>

<div id="maincontent" style="border:1px solid #999999; margin:0 0 0
2px; float:left">
<h2>main content</h2>
<p>Testing</p>
</div></td>
</tr>
</table>
</body>
</html>

thanks for any help
Erwin Moller
Guest
 
Posts: n/a
#2: Sep 28 '05

re: replace table w/ div tag. how?


jaYPee wrote:
[color=blue]
> anyone know how can I replace this code using only the div tag? I have
> tried everything but I can't do it.
>
> here's the code using table:
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
> "http://www.w3.org/TR/html4/loose.dtd">
> <html>
> <head>
> <meta http-equiv="Content-Type" content="text/html;
> charset=iso-8859-1">
> <title>Untitled Document</title>
> </head>
>
> <body>
> <table width="799" align="center" style="border:1px solid #999999">
> <tr>
> <td><div id="sidebar" style="border:1px solid #999999; width:
> 160px; float:left">
> <h2>sidebar</h2>
> <ul id="nav">
> <li><a href="#">Test Link One</a></li>
> <li><a href="#">Test Link Two</a></li>
> <li><a href="#">Test Link Three</a></li>
> <li><a href="#">Test Link Four</a></li>
> <li><a href="#">Test Link Five</a></li>
> </ul>
> <p>Additional sidebar content.</p></div>
>
> <div id="maincontent" style="border:1px solid #999999; margin:0 0 0
> 2px; float:left">
> <h2>main content</h2>
> <p>Testing</p>
> </div></td>
> </tr>
> </table>
> </body>
> </html>
>
> thanks for any help[/color]

Hi,

You can achieve that by using innerHTML, google for it.
But what excactly has this question to do with PHP?
You might get luckier in a DHTML or JS newsgroup. :-)

Regards,
Erwin Moller
Rincewind
Guest
 
Posts: n/a
#3: Sep 28 '05

re: replace table w/ div tag. how?


On Wed, 28 Sep 2005 14:54:10 +0800, jaYPee wrote:
[color=blue]
> anyone know how can I replace this code using only the div tag? I have
> tried everything but I can't do it.[/color]

<snip>

Take a look here http://glish.com/css/ or here
http://www.positioniseverything.net/ and you would do better to ask at
alt.html or comp.infosystems.www.authoring.stylesheets in future.
Closed Thread