styles on tables

This is a discussion on "styles on tables" within the Web Page Design section. This forum, and the thread "styles on tables are both part of the Design Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old May 18th, 2006, 10:54
Up'n'Coming Member
Join Date: Jul 2005
Location: uk
Posts: 84
Thanks: 0
Thanked 0 Times in 0 Posts
Post styles on tables

When applying a style to a table is it better to do it as a table id or just use class. Want to have different style tables so dont want to redefine the table tag. Do id's need to be unique when on the same page.

I am using Dreamweaver studio 8 and on the drop down you can only choose an id once on that page. Can duplicate the id if I use code though. I know most people just use divs but I am still not confident enough to utilise the benefits yet. There seem to be cross brower pitfalls and layout problems particularly with Dreamweaver.

Any advice, yes please!!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old May 18th, 2006, 11:09
Up'n'Coming Member
Join Date: Apr 2006
Location: Missouri
Age: 32
Posts: 65
Thanks: 0
Thanked 0 Times in 0 Posts
Re: styles on tables

Yes you should use ids once per page

If you need help for a bit to use DIV tags you can use these here to get you started.
http://www.oswd.org
http://www.openwebdesign.org
http://blog.html.it/layoutgala/
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old May 18th, 2006, 11:10
Junior Member
Join Date: May 2006
Location: Northampton
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Re: styles on tables

You're right. To go through validation, id's should only be used once so use classes. Add your classes to the TR or TD tags to change the formatting style.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old May 18th, 2006, 11:48
Up'n'Coming Member
Join Date: Jul 2005
Location: uk
Posts: 84
Thanks: 0
Thanked 0 Times in 0 Posts
Re: styles on tables

Quote:
Originally Posted by Dotty
Add your classes to the TR or TD tags to change the formatting style.
Thats good if you want to style all elements in all tables but what if you want more than one table style.

In the past when I have wanted more than one table style instead of using
Code: Select all
TABLE TR TD
which affects all tables or contents, I have created a style e.g. .table01 - .table02 etc then applied the style using class e.g.
Code: Select all
<table width="758" border="0" align="center" cellpadding="0" cellspacing="0" class="table01">
Would it be better to break it up and have additional styles like:
td.table01
tr.table02

Or is there a better way
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old May 18th, 2006, 11:55
herkalees's Avatar
Highly Reputable Member
Join Date: Jul 2005
Location: Massachusetts, USA
Age: 87
Posts: 576
Thanks: 0
Thanked 0 Times in 0 Posts
Re: styles on tables

You can use ID's all over the place only if they're used once per page. Classes can be used twice, or more, per page.

For instance:

You cannot have this on the same page:

<table id="blue">
<tr>
<td>some information</td>
</tr>
</table>

<table id="blue">
<tr>
<td>other information</td>
</tr>
</table>

But you can have this:

<table class="blue">
<tr>
<td>some information</td>
</tr>
</table>

<table class="blue">
<tr>
<td>other information</td>
</tr>
</table>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old May 18th, 2006, 11:56
Up'n'Coming Member
Join Date: Jul 2005
Location: uk
Posts: 84
Thanks: 0
Thanked 0 Times in 0 Posts
Re: styles on tables

Thanks but I am still nervous about cross browser issues using divs particularly when using complex layouts where you float them. Have just read the article on Tables vs CSS-P Poll in this forum http://www.webforumz.com/html-forum/...css-p-poll.htm and I can see I am not the only person having doubts, although I am intrigued by the possibilities.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7  
Old May 18th, 2006, 11:58
Up'n'Coming Member
Join Date: Jul 2005
Location: uk
Posts: 84
Thanks: 0
Thanked 0 Times in 0 Posts
Re: styles on tables

thanks for everyones help
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8  
Old May 18th, 2006, 12:03
herkalees's Avatar
Highly Reputable Member
Join Date: Jul 2005
Location: Massachusetts, USA
Age: 87
Posts: 576
Thanks: 0
Thanked 0 Times in 0 Posts
Re: styles on tables

Quote:
Originally Posted by cyberseed
Thanks but I am still nervous about cross browser issues using divs particularly when using complex layouts where you float them. Have just read the article on Tables vs CSS-P Poll in this forum http://www.webforumz.com/html-forum/...css-p-poll.htm and I can see I am not the only person having doubts, although I am intrigued by the possibilities.
Don't be nervous, I've made cross-browser layouts using floated div's that would be near impossible with tables.

This, for instance: http://amsa.digitalbungalow.com/amsa/bor/highschool/

[edit] Seems like my development server at work is temporarily buggy, check that link later
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #9  
Old May 18th, 2006, 12:16
Up'n'Coming Member
Join Date: Jul 2005
Location: uk
Posts: 84
Thanks: 0
Thanked 0 Times in 0 Posts
Re: styles on tables

Quote:
Originally Posted by herkalees
Don't be nervous, I've made cross-browser layouts using floated div's that would be near impossible with tables.

This, for instance: http://amsa.digitalbungalow.com/amsa/bor/highschool/

[edit] Seems like my development server at work is temporarily buggy, check that link later
Thanks, there seems to be a steep learning curve with complex layouts especially when I have got used to working with tables. Have done some good tutorials but there seems to be alot of unresolved issues and lots of dis-information. Tables are very time consuming so I can see the advantages of having a more liquid layout. Dreamweaver studio 8 doesnt seem to display some code correctly too with divs.
Will look at link latter.
Ta
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #10  
Old May 18th, 2006, 18:50
herkalees's Avatar
Highly Reputable Member
Join Date: Jul 2005
Location: Massachusetts, USA
Age: 87
Posts: 576
Thanks: 0
Thanked 0 Times in 0 Posts
Re: styles on tables

Quote:
Originally Posted by cyberseed
Dreamweaver studio 8 doesnt seem to display some code correctly too with divs.
Yeah, don't bother previewing in Design View, it stinks. Just preview in browser (F12 I think) or do the 'ol upload-and-refresh in a browser.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #11  
Old May 23rd, 2006, 15:02
masonbarge's Avatar
Highly Reputable Member
Join Date: Jan 2006
Location: Atlanta GA
Posts: 631
Thanks: 0
Thanked 0 Times in 0 Posts
Re: styles on tables

You can open the page as a file in any browser and bookmark it. You can have as many browsers open as you want, although I've had problems trying to keep more than one version of IE.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #12  
Old May 23rd, 2006, 16:25
minute44's Avatar
Most Reputable Member

SuperMember
Join Date: Apr 2006
Location: Nottingham UK
Age: 25
Posts: 1,351
Blog Entries: 1
Thanks: 0
Thanked 1 Time in 1 Post
Re: styles on tables

Quote:
Originally Posted by cyberseed
When applying a style to a table is it better to do it as a table id or just use class.
Answer: Don't use Tables... I only ever use them when displaying Tabular data such as opening times and price lists.
Last Blog Entry: Annoying people.... (Jan 16th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #13  
Old May 23rd, 2006, 16:34
Up'n'Coming Member
Join Date: Nov 2005
Location: England
Posts: 71
Thanks: 0
Thanked 0 Times in 0 Posts
Re: styles on tables

check out Layout Gala: a collection of 40 CSS layouts based on the same markup and ready for download! to get you started with cross-browser compliant css layouts.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
styles, tables

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 On

Similar Threads
Thread Thread Starter Forum Replies Last Post
IE6 Ignoring some styles but IE7 works fine?? swillicott Web Page Design 4 May 14th, 2008 11:35
CSS conflicting styles ttaxi Web Page Design 2 Mar 28th, 2008 16:01
who wants to talk about css print styles? PixelLuv Web Page Design 4 Jul 14th, 2006 14:51
Styles in classes? timmytots Web Page Design 4 Dec 2nd, 2005 01:20
Need Help with styles and where to start on this mess... EAndrews Web Page Design 10 Nov 7th, 2005 20:46


All times are GMT. The time now is 01:34.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved