DIV tables

All style (template, theme and imageset) related questions for the new release; advice, feedback here please.
Post Reply
DeatzoSeol
Registered User
Posts: 3
Joined: Sun Oct 15, 2006 3:50 pm

DIV tables

Post by DeatzoSeol » Sun Oct 15, 2006 4:01 pm

Hello everyone :mrgreen:

I was thinking ...
I want to use <div style="display: table"> instead of those obsolete old fashioned <table>-tags 8) ... (Okay, I know IE doesn't show tem, I don't care, IE sucks...) however, it is not easy to make them, because of the 'rowspan' and 'colspan' that is so often used... And since CSS hasn't got an equivalent, I was wondering, what should I use?

(And lets have a discussion about css-tables when we're at it now 8) )

Joablen
Posts: 60
Joined: Sun Aug 27, 2006 3:09 am
Contact:

Re: DIV tables

Post by Joablen » Sun Oct 15, 2006 9:00 pm

colspan and rowspan are now in the past 8) :P
now you just need some floats and other stuff

search for some CSS tuts at pixel2life.com they have a lot of 'em

User avatar
SHS`
Registered User
Posts: 1628
Joined: Wed Jul 04, 2001 9:13 am
Location: The Boonies, Hong Kong
Contact:

Re: DIV tables

Post by SHS` » Mon Oct 16, 2006 7:00 pm

DeatzoSeol wrote: Hello everyone :mrgreen:

I was thinking ...
I want to use <div style="display: table"> instead of those obsolete old fashioned <table>-tags 8) ... (Okay, I know IE doesn't show tem, I don't care, IE sucks...) however, it is not easy to make them, because of the 'rowspan' and 'colspan' that is so often used... And since CSS hasn't got an equivalent, I was wondering, what should I use?

(And lets have a discussion about css-tables when we're at it now 8) )


There are those without a clue and open admit the fact, those that are well versed yet are humble and play down the fact and lastly those think that they have a clue when they are clueless. ;)

A <div> is block element of zero semantic content just in the same way <span> is an inline element of zero semantic content. Whilst CSS provides a way to change the "display" value, using <div> to create a "table" is just every bit as daft as using a <table> and using CSS to change <tr> to have a "display: list-item", when the correct logical, semantically correct tag is an <li> nested within either an <ol> for ordered lists, or <ul> for un-ordered lists.

Got it?
Jonathan “SHS`” Stanley • 史德信
phpBB™ 3.1.x, Bug/Security trackers
phpBB™ Bertie Bear 3.0 — prosilver Edition!Asking Questions The Smart Way

jimmygoon
Registered User
Posts: 75
Joined: Thu Jun 23, 2005 3:59 am

Re: DIV tables

Post by jimmygoon » Mon Oct 16, 2006 8:23 pm

Er, unless this is in reference to tabular data...

1- It won't make sense to use a table tag in the first place (come on folks, get with the times, its called CSS)
2- It wouldn't make any more sense to use a <div> tag with table css applied to it.... unless it was tabular in which case it should've been in a table in the first place

User avatar
Hakaslak
Posts: 5
Joined: Wed Jul 05, 2006 10:45 pm

Re: DIV tables

Post by Hakaslak » Mon Oct 30, 2006 10:18 am

hehe... i've been spending a few days getting phpbb 2.0 to be XHTML 1.1 compliant... *shudder*

anywho, css styling is good for sematic web, where tags are used properly. For example, h1 for the largest text, h2 for smaller, and h3 even smaller... etc. Which is good. People with screen readers (myself included), PDAs, and wonky browsers (IE comes to mind), as well as Lynx, can browse a semantic, standards based website with minimal difficulty as more and more web designers understand and put these standards into practice. This is called accessible web. Or semantic web.markup. Whatever you want ;) The problem is, something called Web 20 was coined, and all hell broke loose.

Some people have jumped onto the EVIL Web 2.0 bandwagon, spamming pages with rounded corners, megabytes of AJAX (protptype, scriptaculous... et al) and assorted things, one of which includes DIVITIS.

What is divitis?

Divitis is a disease that has attacked many a budding web deisgner (myself included). It is an illness that corrupts the mind and spreads itself by word of mouth, infecting thousands of poor souls on the journey to accessible web design. Although simple by nature, divitis is extremely effective at destroying a web page's accessibility and semantic web markup. All it does is lead the web designer to think that everything in a website must be either

A) a DIV
B) nested in a DIV, or
C)within two line breaks of a DIV

It also leads the web designer to think that tables are evil, there must be no sharp corners in the website, everything must have gradients, large fonts are nice, serifs are bad... etc. What some people forget is that there is more to stylesheets and css then the <div></div> tag. Tere is alse the <h>, <dfn>, <dl><dt><dd>, <li>, <label>(all block level elements). Of course, many of us and forget and make crazy things like:

Code: Select all

<html>
<body>
<div id="wrapper">
<div id="header>
<div id="header_text>Welcome to my site!</div>
</div>
Which could just be

Code: Select all

<html><body>
<h1>Wleocme to my site!</h1>
Many people forgot (or do not realize) that BOTH the <html> and <body> tag are block level elements, making the wrapper tag kinda extraeneous(sp?). An also, the problem with the first exampl is that in a screen reader, all the text will look the same, where as with a h1 tag, the welcome line will be significantly larger sans css.
Image

User avatar
Eelke
Registered User
Posts: 606
Joined: Thu Dec 20, 2001 8:00 am
Location: Bussum, NL
Contact:

Re: DIV tables

Post by Eelke » Mon Oct 30, 2006 12:07 pm

jimmygoon wrote: Er, unless this is in reference to tabular data...

Since phpBB is full of tabular data, I would hazard a guess it is ;) Although I think that in 2.0 (don't know about 3.0, haven't had a look at the templates yet) some stuff is tabled that maybe shouldn't be, I think many things in a forum lay out make most sense as a table because it is, as you say, tabular data (e.g. topic title, number of posts, author).

User avatar
Highway of Life
Registered User
Posts: 1399
Joined: Tue Feb 08, 2005 10:18 pm
Location: I'd love to change the World, but they won't give me the Source Code
Contact:

Re: DIV tables

Post by Highway of Life » Mon Oct 30, 2006 9:05 pm

I know you mentioned that "IE Sucks", and I agree, but the fact of the matter is that 70% of internet users use IE as their primary browser, and I don't think this will change anytime fast, but it is changing slowly.
So we must design our web pages with IE in mind first, and Firefox second.
But design it to work in Firefox, then create hacks for it to work in IE, that is the best method. :D
Image

Post Reply