|
Posted by Els on 06/25/05 13:58
Greg N. wrote:
> Els wrote:
>
>> Greg N. wrote:
>>
>>>Els wrote:
>>>
>>>
>>>>>>>>have a look at my test case at http://coolhaus.de/misc/csstest.htm .
>>>>>
>>>>>Yup, leave it as is, but add this line to the top of your file:
>>>>>
>>>>><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
>>>>> "http://www.w3.org/TR/html4/strict.dtd">
>>>>>
>>>>>Makes IE try to follow the same standards as the other browsers ;-)
>>>>
>>>>Eh.. addition: background isn't a valid attribute in Strict, so
>>>>instead, add the style to your styleblock:
>>>>td{background-image:url(ttp://coolhaus.de/misc/smily.gif);}
>>>
>>>Hmm, that will open up another bag of worms for me.
>>>
>>>The sample code is my way of showing some extra-wide images. By making
>>>them a cell background, only as much as the table width allows is shown,
>>>no horizontal scrollbars are used. I want that effect.
>>>
>>>I have dozens of such tables on my pages, each showing a different
>>>image. I don't think I'd like to manage that through CSS. What should I
>>>do?
>>
>> Give each table a class (<table class="foo"> and <table class="bar">
>> for instance) and then in CSS:
>> table.foo td{background-image:url(....);}
>> table.bar td{background-image:url(....);}
>> etc
>
> I have just learned that one should do the content in basic HTML, and do
> all formatting through CSS. Fine.
>
> What you're proposing would, in my case, put my content into CSS?
If the image is content, it shouldn't be a background-image at all.
People on text browsers wouldn't see it, nor see an alternative
description throught alt text. So, if it really is content, and not
decoration, you'll have to make it an <img src="..." alt="...">. But
the fact that you're okay with clipping the right side of the image,
my guess is that it is indeed decoration, and as such, not content.
> In my case, there are too many different images to make this viable.
For that, there is the style attribute:
<td style="background-image:url(...);"> </td>
> By the way, though "background isn't a valid attribute in Strict", it
> seems to work. What negative effects would I risk if I go on using
> background (apart from making the purists cringe :) ?
Just that, I think <g>
--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Navigation:
[Reply to this message]
|