Connecting Tech Pros Worldwide Help | Site Map

replace table w/ div tag. how?

  #1  
Old September 28th, 2005, 07:55 AM
jaYPee
Guest
 
Posts: n/a
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
  #2  
Old September 28th, 2005, 10:05 AM
Erwin Moller
Guest
 
Posts: n/a

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
  #3  
Old September 28th, 2005, 11:15 AM
Rincewind
Guest
 
Posts: n/a

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Show table at div top 100 left 100 position yogarajan answers 6 June 24th, 2008 12:51 PM
unable to select a value in DIV tag ashishc answers 3 January 5th, 2008 12:28 PM
div height and scrollbars samuresh answers 0 September 15th, 2006 10:08 AM
Dom copy table Liming answers 2 July 23rd, 2005 10:02 PM