Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   HTML (http://www.velocityreviews.com/forums/f31-html.html)
-   -   Html Table to Css div (http://www.velocityreviews.com/forums/t159078-html-table-to-css-div.html)

WD 08-15-2004 03:23 PM

Html Table to Css div
 
Hi all,
I've been try to convert an html table to div(s), but i can't seem to
keep the same look? Here's the table:

<table cellspacing=0 cellpadding=1 align=center width=164 bgcolor=#b6cce1
border=0>
<tbody>
<tr>
<td>
<table cellspacing=1 cellpadding=2 width=164 bgcolor=#333366
border=0>
<tbody>
<tr>
<td align=middle background="images/m.jpg">
<div align="center"><b>Auto</b></div>
</td>
</tr>
<tr valign=top>
<td bgcolor=#FFFFFF>
<div align="center">
<a href="link.html">link</a><br>
<a href="link.html">link</a><br>
<a href="link.html">link</a><br>
<a href="link.html">link</a><br>
<a href="link.html">link</a><br>
<a href="link.html">link</a>
</div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>



WebcastMaker 08-15-2004 03:43 PM

Re: Html Table to Css div
 
In article <aeidnR8ED_Lr4oLcRVn-rQ@golden.net>, drakesis@hotmail.com
says...
> I've been try to convert an html table to div(s), but i can't seem to
> keep the same look? Here's the table:


well,since the table does it the way you want, wouldn't it have been
better to post BOTH sets of code? Or even better yet, post URLs
--
WebcastMaker
Webcasting for free
http://www.webentations.com

WD 08-15-2004 04:03 PM

Re: Html Table to Css div
 
Sorry, here is the Div code:

<style type="text/css">

#box {
width: 164px;
padding: 0;
background-color: #b6cce1;
}

#box1 {
width: 164px;
padding: 0;
background-image:url('images/m.jpg');
background-repeat:no-repeat;
background-position:center;
height:23px;
width:164px;
background-color: #b6cce1;
}

.box2 {
width: 162px;
padding: 0;
background-color: #FFFFFF;
}

</style>

<DIV id="box">
<DIV id="box1" align="center">
<b>Auto</b>
</DIV>

<DIV align="center" class="box2">
<a href="Link.html" target="I1">Link</a><br>
<a href="Link.html" target="I1">Link</a><br>
<a href="Link.html" target="I1">Link</a><br>
<a href="Link.html" target="I1">Link</a><br>
<a href="Link.html" target="I1">Link</a><br>
<a href="Link.html" target="I1">Link</a><br>
</DIV>
</DIV>



"WebcastMaker" <info@invalid.com> wrote in message
news:MPG.1b894ebd1e1d88ea98968c@news.charter.net.. .
> In article <aeidnR8ED_Lr4oLcRVn-rQ@golden.net>, drakesis@hotmail.com
> says...
> > I've been try to convert an html table to div(s), but i can't seem

to
> > keep the same look? Here's the table:

>
> well,since the table does it the way you want, wouldn't it have been
> better to post BOTH sets of code? Or even better yet, post URLs
> --
> WebcastMaker
> Webcasting for free
> http://www.webentations.com




Sam Hughes 08-15-2004 04:38 PM

Re: Html Table to Css div
 
"WD" <drakesis@hotmail.com> wrote in
news:aeidnR8ED_Lr4oLcRVn-rQ@golden.net:

> Hi all,
> I've been try to convert an html table to div(s), but i can't
> seem to
> keep the same look? Here's the table:
>
> [...]


Use the following: The doctype is necessary for IE 6 to work.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
"http://www.w3.org/TR/REC-html40/strict.dtd">
<html>
<head>
<title>test</title>
<style type="text/css">
<!--
#box {
padding: 2px;
background: #336;
width: 10.5em;
margin-left: auto;
margin-right: auto;
}
#box1 {
text-align: center;
font-weight: bold;
background: #336 url(images/m.jpg) no-repeat center top;
height: 1.4em;
color: black;
margin: 2px;
}
..box2 {
margin: 0;
background: #FFF;
text-align: center;
}
-->
</style>
</head>

<body>

<div id="box">
<div id="box1">
Auto
</div>

<div class="box2">
<a href="Link.html" target="I1">Link</a><br>
<a href="Link.html" target="I1">Link</a><br>
<a href="Link.html" target="I1">Link</a><br>
<a href="Link.html" target="I1">Link</a><br>
<a href="Link.html" target="I1">Link</a><br>
<a href="Link.html" target="I1">Link</a><br>
</div>
</div>

</body>
</html>


--
How to make it so visitors can't resize your fonts:
<http://www.rpi.edu/~hughes/www/wise_guy/unresizable_text.html>

WD 08-15-2004 05:02 PM

Re: Html Table to Css div
 
Thank you SO much, absolutely prefect! You a Genuis!



"Sam Hughes" <hughes@rpi.edu> wrote in message
news:Xns954680BCFAF06hughesrpiedu@130.133.1.4...
> "WD" <drakesis@hotmail.com> wrote in
> news:aeidnR8ED_Lr4oLcRVn-rQ@golden.net:
>
> > Hi all,
> > I've been try to convert an html table to div(s), but i can't
> > seem to
> > keep the same look? Here's the table:
> >
> > [...]

>
> Use the following: The doctype is necessary for IE 6 to work.
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
> "http://www.w3.org/TR/REC-html40/strict.dtd">
> <html>
> <head>
> <title>test</title>
> <style type="text/css">
> <!--
> #box {
> padding: 2px;
> background: #336;
> width: 10.5em;
> margin-left: auto;
> margin-right: auto;
> }
> #box1 {
> text-align: center;
> font-weight: bold;
> background: #336 url(images/m.jpg) no-repeat center top;
> height: 1.4em;
> color: black;
> margin: 2px;
> }
> .box2 {
> margin: 0;
> background: #FFF;
> text-align: center;
> }
> -->
> </style>
> </head>
>
> <body>
>
> <div id="box">
> <div id="box1">
> Auto
> </div>
>
> <div class="box2">
> <a href="Link.html" target="I1">Link</a><br>
> <a href="Link.html" target="I1">Link</a><br>
> <a href="Link.html" target="I1">Link</a><br>
> <a href="Link.html" target="I1">Link</a><br>
> <a href="Link.html" target="I1">Link</a><br>
> <a href="Link.html" target="I1">Link</a><br>
> </div>
> </div>
>
> </body>
> </html>
>
>
> --
> How to make it so visitors can't resize your fonts:
> <http://www.rpi.edu/~hughes/www/wise_guy/unresizable_text.html>




WebcastMaker 08-15-2004 05:27 PM

Re: Html Table to Css div
 
In article <WqGdnZwEzdIoC4LcRVn-oA@golden.net>, drakesis@hotmail.com
says...
> Thank you SO much, absolutely prefect! You a Genuis!


Oh great.... Now his head is about to explode....
--
WebcastMaker
Webcasting for free
http://www.webentations.com

Leif K-Brooks 08-15-2004 06:54 PM

Re: Html Table to Css div
 
WD wrote:
> Hi all,
> I've been try to convert an html table to div(s), but i can't seem to
> keep the same look? Here's the table:
> <snip long HTML>


Could you give a URL to a page showing the layout you want?

Spartanicus 08-15-2004 06:58 PM

Re: Html Table to Css div
 
"WD" <drakesis@hotmail.com> wrote:

>Hi all,
> I've been try to convert an html table to div(s),


Hmmm :-/

>Here's the table:
>
><table cellspacing=0 cellpadding=1 align=center width=164 bgcolor=#b6cce1
>border=0>
> <tbody>
> <tr>
> <td>
> <table cellspacing=1 cellpadding=2 width=164 bgcolor=#333366
>border=0>
> <tbody>
> <tr>
> <td align=middle background="images/m.jpg">
> <div align="center"><b>Auto</b></div>
> </td>
> </tr>
> <tr valign=top>
> <td bgcolor=#FFFFFF>
> <div align="center">
> <a href="link.html">link</a><br>
> <a href="link.html">link</a><br>
> <a href="link.html">link</a><br>
> <a href="link.html">link</a><br>
> <a href="link.html">link</a><br>
> <a href="link.html">link</a>
> </div>
> </td>
> </tr>
> </tbody>
> </table>
> </td>
> </tr>
> </tbody>
> </table>


That looks like a list of links, mark them up accordingly instead of
replacing one type of incorrect markup with another type of incorrect
markup.

--
Spartanicus

Jari Lehtinen 08-15-2004 07:08 PM

Re: Html Table to Css div
 
On Sun, 15 Aug 2004 11:23:03 -0400, WD <drakesis@hotmail.com> wrote:

> Hi all,
> I've been try to convert an html table to div(s), but i can't seem to
> keep the same look? Here's the table:
>
> <table cellspacing=0 cellpadding=1 align=center width=164 bgcolor=#b6cce1
> border=0>
> <tbody>
> <tr>
> <td>
> <table cellspacing=1 cellpadding=2 width=164 bgcolor=#333366
> border=0>
> <tbody>
> <tr>
> <td align=middle background="images/m.jpg">
> <div align="center"><b>Auto</b></div>
> </td>
> </tr>
> <tr valign=top>
> <td bgcolor=#FFFFFF>
> <div align="center">
> <a href="link.html">link</a><br>
> <a href="link.html">link</a><br>
> <a href="link.html">link</a><br>
> <a href="link.html">link</a><br>
> <a href="link.html">link</a><br>
> <a href="link.html">link</a>
> </div>
> </td>
> </tr>
> </tbody>
> </table>
> </td>
> </tr>
> </tbody>
> </table>


It's a shame that currently most browsers doesn't support CSS element
display: table-row, table-cell etc. It would really simplify things when a
specific site doesn't need to work with older browsers.

--
Jari Lehtinen
http://www.jarilehtinen.net

Spartanicus 08-15-2004 07:16 PM

Re: Html Table to Css div
 
"Jari Lehtinen" <jari@--no-spam--jarilehtinen.net> wrote:

>It's a shame that currently most browsers doesn't support CSS element
>display: table-row, table-cell etc.


Most browsers do, IE doesn't.

--
Spartanicus


All times are GMT. The time now is 10:48 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.