Help! CSS!
Nov. 30th, 2007 04:41 pmUpdate: problem solved now, see comment to
chrisvenus
I have here a bunch of scary, autogenerated HTML. I have a stylesheet which firmly says that inside a particular class:
white-space: nowrap;
The class thingy always appears inside a table's <td> element.
My generated HTML diplays beautifully in Firefox, all nicely on one line as I want it to be.
The compiled HTML I'm building from it, however, has the text wrapped. Which, in the circumstances, is very bad. I've established that other things in the same stylesheet are definitely being applied correctly.
Wait a minute...
<checks IE>
Yup, the straight HTML displays wrongly in IE as well.
So... IE and M$'s HTML compiling tool both ignore the nowrap attribute.
Googling around, it seems that there can be problems if you specify nowrap and specify table widths. However, as far as I can tell neither my scary autogenerated HTML nor my stylesheet make any remarks about how wide a table should be, or indeed how it should be laid out at all.
Is there anything I can do to make it behave nicely in IE ?
I have here a bunch of scary, autogenerated HTML. I have a stylesheet which firmly says that inside a particular class:
white-space: nowrap;
The class thingy always appears inside a table's <td> element.
My generated HTML diplays beautifully in Firefox, all nicely on one line as I want it to be.
The compiled HTML I'm building from it, however, has the text wrapped. Which, in the circumstances, is very bad. I've established that other things in the same stylesheet are definitely being applied correctly.
Wait a minute...
<checks IE>
Yup, the straight HTML displays wrongly in IE as well.
So... IE and M$'s HTML compiling tool both ignore the nowrap attribute.
Googling around, it seems that there can be problems if you specify nowrap and specify table widths. However, as far as I can tell neither my scary autogenerated HTML nor my stylesheet make any remarks about how wide a table should be, or indeed how it should be laid out at all.
Is there anything I can do to make it behave nicely in IE ?
no subject
Date: 2007-11-30 04:58 pm (UTC)no subject
Date: 2007-11-30 04:58 pm (UTC)no subject
Date: 2007-11-30 04:59 pm (UTC)no subject
Date: 2007-11-30 05:00 pm (UTC)It's doxygen-generated API documentation for stuff which I can't broadcast. I'll see if I can produce a page which does the same thing, though.
no subject
Date: 2007-11-30 05:00 pm (UTC)no subject
Date: 2007-11-30 05:03 pm (UTC)no subject
Date: 2007-11-30 05:02 pm (UTC)no subject
Date: 2007-11-30 05:05 pm (UTC)It seems that if you do something like:
<table class="my_class">
<td class="other_class">stuff</td>
...
etc
Then FF will apply properties from my_class to the <td> element as well, but IE won't.
So I can solve it simply by adding the nowrap thingy to other_class's style nonsense as well.
no subject
Date: 2007-11-30 05:10 pm (UTC)no subject
Date: 2007-11-30 05:16 pm (UTC)no subject
Date: 2007-11-30 05:22 pm (UTC)no subject
Date: 2007-12-01 06:23 pm (UTC)no subject
Date: 2007-12-01 06:34 pm (UTC)no subject
Date: 2007-11-30 05:08 pm (UTC)Thank you, anyway. If I hadn't been trying to write a page to release into the wild I probably wouldn't have noticed that there was another class hiding in there that I hadn't noticed.
no subject
Date: 2007-11-30 05:16 pm (UTC)I always find minimum test cases are a great way to find a problem. If nothing else because as you chop stuff out you suddenly realise that you chopped out a chunk and suddenly it was working and then notice the pesky javscript or style declaration or whatever that is causing the problems. :)
no subject
Date: 2007-11-30 05:06 pm (UTC)Is there anything I can do to make it behave nicely in IE ?
Hahahahahah!
Um, sorry, that wasn't very sympathetic of me. It's just that I'm doing a web app design course at the moment, and getting things behaving nicely in IE is just about the hardest thing ever. The single biggest nuisance ever is the way that padding and margins are done differently in IE that causes things to end up in the wrong place, wrapped wrongly and gone wrong and look stupid and...
no subject
Date: 2007-11-30 05:12 pm (UTC)