- From: Chris Lilley <Chris.Lilley@sophia.inria.fr>
- Date: Wed, 21 Aug 1996 14:50:07 +0200 (DST)
- To: Stephanos Piperoglou <stephanos@hol.gr>, www-style@w3.org
On Aug 21, 1:37am, Stephanos Piperoglou wrote:
> <H1 ALIGN=center><IMG SRC="images/worldport_logo-big.jpg"
> ALT="WorldPort"></H1>
>
> This is nice, usually. When the image is displayed, it is shown as the
> title, and when it is not, the ALT text is rendered as Heading 1 text. (on
> an aside: is this correct and expected browser behaviour?)
This is what I would expect and seems to be what current text-oriented UAs do.
Since we are stuck with IMG having no content, until OBJECT is widely
implemented, this is best.
> <H1 CLASS="H1.worldport">WorldPort</H1>
>
> or
>
> <H1 STYLE="altimage: images/worldport_logo-big.jpg">WorldPort</H1>
>
> (sorry if I'm getting the syntax wrong, my only experience with CSS is
> through the specs)
That is fine. H1.worldport is valid but just CLASS="worldport" would do fine. I
think that you are remembering the shorthand for class in a stylesheet
selector:
<style>
h1.worldport {stuff }
</style>
<h1 class="worldport>Worldport</h1>
> and a style-sheet aware browser that displays images
> would display the image specifed instead of the text. Any other User Agent
> would identify the content of the heading for what it is, i.e. the word
> "WorldPort".
>
> Well, that's it. What does everyone think? Would this be useful? Feasible?
> Utter piffle?
You can already set a background image on any element in css. Recently, it was
proposed that colors should also have alpha values. So, one possibility would
be
h1.worldport {
background: url(http://site/images/worldport_logo-big.jpg);
padding: 120pt 80pt;
color: rgba (0% 0% 0% 0%)
}
This stops the text being placed on top of the image (by giving it 0% opacity
- fully transparent), but is not really satisfactory because the size of the
element still depends on the size of the (invisible, but still displayed) text.
Using display: none would turn off the display of the entire element, including
it's backgrouns image, so that would not be desirable. The font-size could be
set to zero points, I suppose. None of these options seems especially elegant.
--
Chris Lilley, W3C [ http://www.w3.org/ ]
Graphics and Fonts Guy The World Wide Web Consortium
http://www.w3.org/people/chris/ INRIA, Projet W3C
chris@w3.org 2004 Rt des Lucioles / BP 93
+33 93 65 79 87 06902 Sophia Antipolis Cedex, France
Received on Wednesday, 21 August 1996 08:52:31 UTC