473,399 Members | 2,146 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

replace table w/ div tag. how?

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
Sep 28 '05 #1
2 2480
jaYPee wrote:
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


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
Sep 28 '05 #2
On Wed, 28 Sep 2005 14:54:10 +0800, jaYPee wrote:
anyone know how can I replace this code using only the div tag? I have
tried everything but I can't do it.


<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.
Sep 28 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

19
by: Westcoast Sheri | last post by:
To keep track of how many fruits my visitors buy, I use a mySQL database (2 columns: "fruit" and "quantity")....so can we make these following mySQL queries work somehow? (visitor buys 5...
4
by: Jane Doe | last post by:
Hi, I need to search and replace patterns in web pages, but I can't find a way even after reading the ad hoc chapter in New Rider's "Inside JavaScript". Here's what I want to do: function...
2
by: stabbert | last post by:
Can anyone confirm that the privelges needed to do an IMPORT with REPLACE have changed from 7.x to 8.x in DB2 UDB? I am finding the following definition in the online books for version 8 of DB2. ...
2
by: Daniel | last post by:
I use an Access database to basically take data exports, import them, manipulate the data, and then turn them into exportable reports. I do this using numerous macros, and queries to get the data...
5
by: pembed2003 | last post by:
Hi all, I need to write a function to search and replace part of a char* passed in to the function. I came up with the following: char* search_and_replace(char* source,char search,char*...
4
by: serge | last post by:
I managed to put together C# code and have it do the following: 1- Get all the table names that start with the letter "Z" from sysobjects of my SQL 2000 database and put these table names...
3
by: Niyazi | last post by:
Hi all, I have a dataTable that contains nearly 38400 rows. In the dataTable consist of 3 column. column 1 Name: MUHNO column 2 Name: HESNO Column 3 Name: BALANCE Let me give you some...
1
by: JC | last post by:
I have a table which is replicated for after images only. I tried to do an import using the replace option into the source table with data. For some of the rows, they were not in the import file,...
6
by: JackpipE | last post by:
Here is my replace query and I need to run this on every column in my table. Right now I manually enter the column name (_LANGUAGES_SPOKEN) but this is time consuming and would like to automate...
6
by: simon.robin.jackson | last post by:
Ok. I need to develop a macro/vba code to do the following. There are at least 300 corrections and its expected for this to happen a lot more in the future. Therefore id like a nice...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.