table problem in IE(of course)

08-31-06, 03:55 AM
|
 |
Community Liaison
|
|
Join Date: May 2005
Location: Antwerp, Belgium
Posts: 3,165
Thanks: 4
Thanked 25 Times in 25 Posts
|
|
|
table problem in IE(of course)
Hi,
i recently started working with xml and css, and i found out that IE does not support the display:table option in css. Is there a way to work around this problem? without using html.
Here's the code i'm using at the moment. This is jsut an example of O'Reilly, the book i'm using to learn xml and css:
The xml page:
The css page:
This might look a little bit messy, but that's just because i've been messing around with this script, just to see what all the possibilities are.
Greetz and Thanx in advance,
UnrealEd
__________________
"Good judgement comes from experience, and experience comes from bad judgement." - Fred Brooks
|

08-31-06, 09:48 AM
|
 |
Coding Addict
|
|
Join Date: Nov 2005
Posts: 332
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
this was from sitepoint article this morning, and is very easy to follow. sometimes you have to work around IE which is a pain. especially when it will coem to your footer.
Quote:
HTML Tables are not Evil
Sure, you can go to great lengths to reproduce the behaviour of tables using CSS, but sometimes tables are exactly what you should use.
Let's try this again. From Susan Douglas:
“I am currently on the fence between CSS and tables. […] How do I create columns in a list? For instance, a list of books with titles and authors. Or a list with edit and delete buttons. On a typewriter (or in Notepad) I would use tabs. I stick with tables because I can get it to line up the way I want.”
A list with columns—why, that sounds like the definition of a table to me! The choice to use CSS for page layout does not mean you should swear off ever using HTML tables. Information that is naturally presented using rows and columns (so-called tabular data) can and should be marked up using tables.
With this in mind, here's what your markup should look like:
<table>
<thead>
<tr>
<th scope="col">Title</th>
<th scope="col">Author</th>
<th scope="col">Year</th>
</tr>
</thead>
<tbody>
<tr>
<td><cite>The JavaScript
Anthology</cite></td>
<td>James Edwards & Cameron Adams</td>
<td>2006</td>
</tr>
<tr>
<td><cite>The CSS Anthology</cite></td>
<td>Rachel Andrew</td>
<td>2005</td>
</tr>
<tr>
<td><cite>The PHP Anthology</cite></td>
<td>Harry Fuecks</td>
<td>2003</td>
</tr>
</tbody>
</table>
…which is just an HTML table—nothing fancy. Where CSS comes in is in presenting this table so that it looks like a list. First, we can the thead element, which contains the row of header cells:
thead {
display: none;
}
Depending on which browsers you need to support, there are better ways of doing this so that the content of the table headers is still seen by screen readers, but because the column structure of the data isn't especially important in this case we can get away with simply hiding them.
Next, we can style the book titles so that they look like a bulleted list:
cite {
display: list-item;
list-style-type: disc;
margin-left: 2em;
}
That's it! Way simpler than attempting to lay out the information without a table, as I did last issue, and the HTML table reinforces the meaning of the data to be displayed.
|
hope it helps.
__________________
learning like everyone else
|

09-01-06, 09:09 AM
|
 |
Community Liaison
|
|
Join Date: May 2005
Location: Antwerp, Belgium
Posts: 3,165
Thanks: 4
Thanked 25 Times in 25 Posts
|
|
thanx for the reply, but that's not really what i need:
this article is about converting a table into a list, and that's not what i want. I have to use the xml-tags (ingredients, ingredient, component and quantity, in this case) and make a table of it.
if i do this in Mozilla Firefox, everything works perfectly. But IE does not support the display:table option in css, to be more precisly: it isn't display table rows. it creates the table, but all data that should be spread over rows are listed in 1 row.
the reason why i'm not using html, is because i'm learning a little bit about xml.
If there's no sollution for the table problem, i will switch to xslt to transform my xml into html. But first, i wonna give css a try.
thanx,
UnrealEd
__________________
"Good judgement comes from experience, and experience comes from bad judgement." - Fred Brooks
|

09-01-06, 10:52 AM
|
 |
Community Liaison
|
|
Join Date: May 2005
Location: Antwerp, Belgium
Posts: 3,165
Thanks: 4
Thanked 25 Times in 25 Posts
|
|
thanx, i'll have a look.
the first site i allready visited 5 mins ago  . i have a small problem with the third website as it gives an error:
Quote:
|
status: error:5 Login required from your ISP due to robotic abuse from your fellow ISP users. .be
|
anyway, i really appriciate your help. i'll have a look, and i'll post back if i still have my problem.
thanx,
UnrealEd
__________________
"Good judgement comes from experience, and experience comes from bad judgement." - Fred Brooks
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|