Hmmm, I'm a little confused about exactly what you're trying to do here Zaberfang, are you trying to make a table using CSS or change the formatting of a table using CSS?
The first isn't possible, but the second is. CSS is purely for formatting markup (i.e. HTML), it's not like JavaScript where you can script tables on the fly (not that I'd recommend anyone does this - it's horribly slow )
Why would you need to use divs to "make" a table?? Tables are tables, divs are divs. No reason to turn a table into divs Unless, of course, it was never supposed to be a table in the first place but then why would you need the CSS to define it as table elements?
There are some neat things you can do with tables using CSS:
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.
kazimmerman posted this at 17:37 — 1st October 2005.
He has: 698 posts
Joined: Jul 2005
Sure, just add a class name to your table, like this:
<table class="table1">
...
</table>
Then, in your CSS file, do the following:
.table1 {
(attributes)
}
Just like you would any other tag.
Kurtis
Renegade posted this at 00:14 — 2nd October 2005.
He has: 3,022 posts
Joined: Oct 2002
Or, if you're talking about making a table with just CSS and DIVs, you can do this:
<div class="row">
<div class="cell">Cell 1</div>
<div class="cell">Cell 2</div>
</div>
<div class="row">
<div class="cell">Cell 1</div>
<div class="cell">Cell 2</div>
</div>
And the CSS:
.row {
display:table-row;
}
.cell {
display:table-cell;
}
Not too sure if I got the CSS right, and if I did, it doesn't work in IE - as expected, it will work in Firefox though, and possibly Opera too.
demonhale posted this at 01:14 — 2nd October 2005.
He has: 3,278 posts
Joined: May 2005
or read the thread about css and tables...
Zaberfang posted this at 10:33 — 2nd October 2005.
He has: 10 posts
Joined: Oct 2005
Thanks.
I'll make good sue of this knowledge.
JeevesBond posted this at 17:59 — 2nd October 2005.
He has: 3,956 posts
Joined: Jun 2002
Hmmm, I'm a little confused about exactly what you're trying to do here Zaberfang, are you trying to make a table using CSS or change the formatting of a table using CSS?
The first isn't possible, but the second is. CSS is purely for formatting markup (i.e. HTML), it's not like JavaScript where you can script tables on the fly (not that I'd recommend anyone does this - it's horribly slow )
a Padded Cell our articles site!
Megan posted this at 21:25 — 2nd October 2005.
She has: 11,421 posts
Joined: Jun 1999
Why would you need to use divs to "make" a table?? Tables are tables, divs are divs. No reason to turn a table into divs Unless, of course, it was never supposed to be a table in the first place but then why would you need the CSS to define it as table elements?
There are some neat things you can do with tables using CSS:
http://www.w3schools.com/css/css_reference.asp#table
Megan
Connect with us on Facebook!
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.