News:

LVCS.NET offers low cost domain registration services.

Main Menu

CSS

Started by Evilsprouts, April 21, 2006, 05:55:38 PM

Previous topic - Next topic

Guide

Well, if you want to put data into a table, nothing goes against using the <table> tags...
Using <div>'s and CSS layout doesn't forbid to use tables when they are needed ;)

Else you could use the float attribute and get some good result, but it'd be much difficulty for something which could be solved much more easily...

hypnoticvibe

@Evil sprouts...
Guide is right.
I think I know exactly what you are asking for. You just want a simple grid. Use the regular table elements:
<table border="1">

<tr>
  <td>blah1</td>
  <td>blah4</td>
  <td>blah7</td>
</tr>
<tr>
  <td>blah2</td>
  <td>blah5</td>
  <td>blah8</td>
</tr>
<tr>
  <td>blah3</td>
  <td>blah6</td>
  <td>blah9</td>
</tr>

</table>

The results will be:
-------------------------------------
|   blah1   |   blah2   |   blah3   |
--------------------------------------
|   blah4   |   blah5   |   blah6   |
--------------------------------------
|   blah7   |   blah8   |   blah9   |
--------------------------------------

    And this is the absolute wrong way to think of your options:
  • HTML
  • CSS
You can make whatever in HTML and then use CSS to style it. That is the whole point of CSS. You can set your stylesheet up like this:
table {
  CSS DECLARATIONS
}


You could add to the first code example:
<table border="1" style="CSS DECLARATIONS">

You could put the table inside of a DIV if you really wanted to:
.CSS CLASS NAME {
  CSS DECLARATIONS
}
<div class="CSS CLASS">
  <table border...
</div>


There's more approaches but my point is that you can use HTML tables and still set up CSS (like you said you wanted). If my table is not enough and you want all of the table elements/parameters, click here.

Evilsprouts

Yeah thanks both of you ill use tables instead of pure css, I didn't want to have to use tables but it makes more sense to.

hypnoticvibe

#63
Quote from: Evilsprouts on May 31, 2006, 08:42:58 PM
I didn't want to have to use tables but it makes more sense to.
It really makes no sense not to use regular table tags for this. A programmer should keep his/her code as cleanly written and easily readable/understandable as possible.

sixthcrusifix

Quote from: Evilsprouts on May 31, 2006, 08:42:58 PM
Yeah thanks both of you ill use tables instead of pure css, I didn't want to have to use tables but it makes more sense to.

earlier you said you wanted to make a CSS table.. well that's just silly. Why make a CSS table when you can use a normal Table? Always use teh appropraite tools my perspective teacher says. You can use a trangle for a straight edge but sometimes it just doesn't measure up.
Visite me website at http://www.sixthcrusifix.com

Evilsprouts

Quote from: sixthcrusifix on June 04, 2006, 02:47:31 AM
Quote from: Evilsprouts on May 31, 2006, 08:42:58 PM
Yeah thanks both of you ill use tables instead of pure css, I didn't want to have to use tables but it makes more sense to.

earlier you said you wanted to make a CSS table.. well that's just silly. Why make a CSS table when you can use a normal Table? Always use teh appropraite tools my perspective teacher says. You can use a trangle for a straight edge but sometimes it just doesn't measure up.

Actually it is not silly, it called keeping your code clean and flowing. It is my goal to make a site where table tags and other conventional  tags are replaced with css.

brainiac744

Tables are still valid tags if you're using them for tabular data... That is their purpose. Using them for layout is an improper use, but using them for ordinary tabular data is proper usage. I don't see the problem. I think everybody just has decided to hate the table tag, whether it is a valid hatred or not.

sixthcrusifix

Quote from: brainiac744 on June 04, 2006, 04:53:17 PM
Tables are still valid tags if you're using them for tabular data... That is their purpose. Using them for layout is an improper use, but using them for ordinary tabular data is proper usage. I don't see the problem. I think everybody just has decided to hate the table tag, whether it is a valid hatred or not.

The only nice thing about tables in layouts is that if you can make it loook like you want it isnt incredibly hard. With CSS you have to define a bunch of stuff, it seems a bit complicated.

A lot of porn sites still use table layouts because of the simplicity, they can pop out site after site really quick and they'll work in almost any browser than can view gifs.
Visite me website at http://www.sixthcrusifix.com

hypnoticvibe

Quote from: sixthcrusifix on June 04, 2006, 10:14:26 PM
A lot of porn sites still use table layouts...
Oy!
Get your mind out of the gutter.
j/k

sixthcrusifix

Quote from: hypnoticvibe on June 05, 2006, 02:40:29 AM
Quote from: sixthcrusifix on June 04, 2006, 10:14:26 PM
A lot of porn sites still use table layouts...
Oy!
Get your mind out of the gutter.
j/k

LMAO I'm not some type of porn addict. I actually go around looking at all types of porn sites to see which ones offer the best and least ad-filled services, gay straight midgets or mutants I've seen it and I've never been impressed.
Visite me website at http://www.sixthcrusifix.com

Ben

Keep the conversation appropriate. Gotta remember topics like that are against the terms of FreePgs, and anything against the rules may be eaten alive by the trash can..
--Ben
Ben@freepgs.com

Guide

QuoteActually it is not silly, it called keeping your code clean and flowing. It is my goal to make a site where table tags and other conventional  tags are replaced with css.

Beware : though a code with nothing but <div>'s, <span>'s and CSS classes will be W3C valid, it goes against its recommandations, which include using semantic tags.

Moreover, <span> or <div> aren't recognized as important tags by the search engines robots, which means your site won't be as well indexed as it would have been if semantically correct.
For instance, the following code :
<div class="title">My Title</div>
<div class="paragraph">Some text, with maybe something <span class="important">important</span> in it</div>

will be completely XHTML valid. However, it'd have been far better to have written :
<h1>My Title</h1>
<p>Some text, with maybe something <strong>important</strong> in it</p>

which is both valid and semantically accurate.

Thus, for data, never fear to use tables : they are valid, and they follow W3C recommandations... (And they are far easier to put in place)

The issue of <table> used as layout has been discussed earlier in this thread, without anyone being able to convince the others of their point of view ;)

hypnoticvibe

#72
Interesting coincidence. I just learned what the word semantic (which your strongly emphasized) meant yesterday and the people said the exact same thing.
Quote from: Guide on June 06, 2006, 04:05:08 PM
The issue of <table> used as layout has been discussed earlier in this thread, without anyone being able to convince the others of their point of view ;)
Alright, I'm going to challenge that now. How are you supposed to create resizable tables to fit monitor resolutions without any CSS? In fact, resize this window. Forums in particular use the auto value in CSS. How do you intend on achieving that through just HTML/XHTML? This page is a project gone wrong but look at the monochrome hovers and growing buttons on hover. Have you seen hover spans? They're ones where you put your mouse over it and an object appears detached from the link. How do you intend on achieving that through just HTML/XHTML? You can images change on hover. You can make image backgrounds change on hover. You can use images to get a flash-like effect by using animated GIFs on hover. You can specify which text on the page has certain hovers and others not to.
You can also use JS for some of this but why?

sixthcrusifix

Quote from: hypnoticvibe on June 07, 2006, 06:24:36 AM
Interesting coincidence. I just learned what the word semantic (which your strongly emphasized) meant yesterday and the people said the exact same thing.
Quote from: Guide on June 06, 2006, 04:05:08 PM
The issue of <table> used as layout has been discussed earlier in this thread, without anyone being able to convince the others of their point of view ;)
Alright, I'm going to challenge that now. How are you supposed to create resizable tables to fit monitor resolutions without any CSS? In fact, resize this window. Forums in particular use the auto value in CSS. How do you intend on achieving that through just HTML/XHTML? This page is a project gone wrong but look at the monochrome hovers and growing buttons on hover. Have you seen hover spans? They're ones where you put your mouse over it and an object appears detached from the link. How do you intend on achieving that through just HTML/XHTML? You can images change on hover. You can make image backgrounds change on hover. You can use images to get a flash-like effect by using animated GIFs on hover. You can specify which text on the page has certain hovers and others not to.
You can also use JS for some of this but why?

Well actually that's a bad argument. You can easily resize tables for any sized resolution by using a percentage value in the width or height attribute and the javascript for those things is partially integrated into HTML so it doesn't require a script tag. But you are right.

With CSS you gain this:

• Faster load time *on a layout with tons of images and lots of blocks*
• More compatable with unique and unusual browser types.
• Designs are more scaleable and ultimately give you more possibilities for appearance.
• Search Engines will better go through your site.
• Define a particular image rollover once and then call on it with a simple span or div.
• Cleaner and easier to tell the content from the coding.
• W3c Says you should, and since their director CREATED the World Wide Web, I think he knows what he's talking about.
• Using tables really isn't so much of a horrible crime if everything else in in order however I used to find my self adjusting TDs and widths for hours trying to get images to match etc. when it took only a few seconds to correctly define the attributes in CSS.
If you have an ntegrated table layout and, as is often stated, you want to change teh way your tables look, you have to change EVERY one of them.


"But screw you I still wanna use tables"

Okay fine. If you must use tables, DON'T Give them any atributes, give them a class and define their atributes with CSS. You can still do at lot of things to tables just by giving them a class and using CSS although it's really intended for data that would be in a table, like prices.  I still use tables in some occations, like in a price chart that I did. It would be stupid to use anything but tables for a chart that has a price list or a list of users and passwords etc. For that kind of data tables are more reliable where as you coudl screw up the whole table if you type something wrong making it with CSS, there are only three table related tags and it's hard to get wrong.

I saw the light, I converted and you should too!

(PS: You may notice that my main page still uses a table. This is because I'm lazy and the way I have it google catches it nicely so I dun wanna change it)
Visite me website at http://www.sixthcrusifix.com

hypnoticvibe

#74
Quote from: sixthcrusifixCSS, there are only three table related tags and it's hard to get wrong.
3 tables tags? Who taught you that?
<table>
<caption>
<thead>
<tbody>
<tfoot>
<td>
<tr>
<th>
<col>
<colgroup>
"W3c is great guide but it's not the Bible."
That is a what a friend currently hired as a webdesigner told me. I do agree with their (w3c) point of course but they have made mistakes in the past and history repeats itself.
And wait, do you mean to tell me that because someone invented the world wide web they are more intelligent than every other human being on Earth?
And most importantly, my "bad argument" (which contains valid points) was about 5% of my concerns.
I never said that's every reason that exists. I simply named a few.
Honestly, this debate is a bit ridiculous. Let's look at the most qualified/successful software companies, famous websites, browser creators, OS creators, and computer manufacturers:
There's a very good reason why they all use CSS and not just tables.