Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Table to CSS

Reply
Thread Tools

Table to CSS

 
 
Jay
Guest
Posts: n/a
 
      07-12-2004
I am trying to get rid of tables on my website that are not used for tabular
data. I have one table that holds a menu selection as such:

<table width="100%">
<tr>
<td width="16%">Menu Item</td>
<td width="16%">Menu Item</td>
<td width="16%">Menu Item</td>
<td width="16%">Menu Item</td>
<td width="16%">Menu Item</td>
<td width="16%">Menu Item</td>
</tr>
</table>

I would like to use CSS to position these elements in the same fashion as
above.

Any tips?

--
JayB


 
Reply With Quote
 
 
 
 
Kris
Guest
Posts: n/a
 
      07-12-2004
In article <jrzIc.577$>,
"Jay" <> wrote:

> I am trying to get rid of tables on my website that are not used for tabular
> data. I have one table that holds a menu selection as such:
>
> <table width="100%">
> <tr>
> <td width="16%">Menu Item</td>
> <td width="16%">Menu Item</td>
> <td width="16%">Menu Item</td>
> <td width="16%">Menu Item</td>
> <td width="16%">Menu Item</td>
> <td width="16%">Menu Item</td>
> </tr>
> </table>
>
> I would like to use CSS to position these elements in the same fashion as
> above.
>
> Any tips?


<ul id="navigation">
<li>Menu Item</li>
....
</ul>

#navigation li {
float: left;
width: 16%;
}

That's the basic setup.

--
Kris
<> (nl)
 
Reply With Quote
 
 
 
 
Stephen
Guest
Posts: n/a
 
      07-12-2004
In news:jrzIc.577$,
Jay <> expounded:
| I am trying to get rid of tables on my website that are not used for
| tabular data. I have one table that holds a menu selection as such:
|
| <table width="100%">
| <tr>
| <td width="16%">Menu Item</td>
| <td width="16%">Menu Item</td>
| <td width="16%">Menu Item</td>
| <td width="16%">Menu Item</td>
| <td width="16%">Menu Item</td>
| <td width="16%">Menu Item</td>
| </tr>
| </table>
|
| I would like to use CSS to position these elements in the same
| fashion as above.
|
| Any tips?

This would do it. You can adjust the padding f necessary to make the display
what you want.

--

stephen


 
Reply With Quote
 
Toby Inkster
Guest
Posts: n/a
 
      07-12-2004
Jay wrote:

> I would like to use CSS to position these elements in the same fashion as
> above.


http://examples.tobyinkster.co.uk/css-rollovers.html

--
Toby A Inkster BSc (Hons) ARCS
Contact Me - http://www.goddamn.co.uk/tobyink/?page=132

 
Reply With Quote
 
Stephen
Guest
Posts: n/a
 
      07-12-2004
In news:bHzIc.54723$,
Stephen <> expounded:
| In news:jrzIc.577$,
| Jay <> expounded:
|| I am trying to get rid of tables on my website that are not used for
|| tabular data. I have one table that holds a menu selection as such:
||
|| <table width="100%">
|| <tr>
|| <td width="16%">Menu Item</td>
|| <td width="16%">Menu Item</td>
|| <td width="16%">Menu Item</td>
|| <td width="16%">Menu Item</td>
|| <td width="16%">Menu Item</td>
|| <td width="16%">Menu Item</td>
|| </tr>
|| </table>
||
|| I would like to use CSS to position these elements in the same
|| fashion as above.
||
|| Any tips?
|

This would do it. You can adjust the padding if necessary to make the
display what you want.

<div align="center">
<a href="2001.shtml" style="padding-right:2em">2001 articles</a>
<a href="2002.shtml" style="padding-right:2em">2002 articles</a>
<a href="back.shtml" style="padding-right:2em">background images</a>
<a href="empath.shtml" style="padding-right:2em">empathic journey</a>
<a href="guest.shtml" target="_blank"
style="padding-right:2em">guestbook</a>
<a href="index.shtml">home</a>
</div>

--

stephen


 
Reply With Quote
 
Mitja
Guest
Posts: n/a
 
      07-12-2004
Jay <>
(news:jrzIc.577$) wrote:
> I am trying to get rid of tables on my website that are
> not used for tabular data. I have one table that holds a
> menu selection as such:
>
> <table width="100%">
> <tr>
> <td width="16%">Menu Item</td>
> <td width="16%">Menu Item</td>
> <td width="16%">Menu Item</td>
> <td width="16%">Menu Item</td>
> <td width="16%">Menu Item</td>
> <td width="16%">Menu Item</td>
> </tr>
> </table>
>
> I would like to use CSS to position these elements in the
> same fashion as above.
>
> Any tips?


What Kris suggested. Note, however, that CSS doesn't mean saying no to
tables. You can leave the table as it is and style it with CSS. This is
better than what you have (more flexible), though still not as good as the
floating version (which is semantically more suggestive, since it's a _list_
of links you have)


 
Reply With Quote
 
Webcastmaker
Guest
Posts: n/a
 
      07-12-2004
In article <jrzIc.577$>,
says...
> I am trying to get rid of tables on my website that are not used for tabular
> data.

Use this knowledge wisely.

> I have one table that holds a menu selection as such:
> <table width="100%">
> <tr>
> <td width="16%">Menu Item</td>
> <td width="16%">Menu Item</td>
> <td width="16%">Menu Item</td>
> <td width="16%">Menu Item</td>
> <td width="16%">Menu Item</td>
> <td width="16%">Menu Item</td>
> </tr>
> </table>
>
> I would like to use CSS to position these elements in the same fashion as
> above.
> Any tips?


Use an UL for the menu.

http://www.moronicbajebus.com/playgr...splay/hormenu/

Google "UL horizontal menu CSS" for more samples

--
WebcastMaker
The easiest and most affordable way to create
Web casts, or put presentations on the Web.
www.webentations.com
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CSS table don't look like html TABLE vitay HTML 8 11-09-2006 05:56 PM
please explain css entry #subnav table table {border-bottom:none;} jason@cyberpine.com HTML 3 09-24-2006 03:36 PM
CSS Layout question - how to duplicate a table layout with CSS Eric ASP .Net 4 12-24-2004 04:54 PM
Table/table rows/table data tag question? Rio HTML 4 11-05-2004 08:11 AM
Could not load type VTFixup Table from assembly Invalid token in v-table fix-up table. David Williams ASP .Net 2 08-12-2003 07:55 AM



Advertisments