Re: title attribute
- From: dorayme <dorayme@xxxxxxxxxxxxxxx>
- Date: Fri, 29 Jul 2011 17:53:31 +1000
In article <j0tfp0$eon$1@xxxxxxxxxxxxx>,
Stanimir Stamenkov <s7an10@xxxxxxxxxxxx> wrote:
Thu, 28 Jul 2011 19:53:40 -0700 (PDT), /fulio pen/:
I have following code:
<span class='rec' title='abc'>xyz</span>
On the web page, when moving the cursor to 'xyz', 'abc' would appear
in a small rectangle. What I like to do is to have a larger rectangle
and abc. I tried following css code:
.rec title {font-size:200%;}
The given selector matches a <title> element descendant of element
having a 'rec' class, so it won't work.
But it is not working. I wonder whether it is possible to achieve the
desired effect.
'title' attributes content is usually rendered using system
tool-tips. There's no standard way to style these using CSS. I've
seen suggested [1] the following form:
<style>
.rec { position: relative; }
.tip { display: none; }
.rec:hover > .tip {
position: absolute;
display: block;
font-size: 200%;
top: 0.5em;
left: 0;
}
</style>
<span class="rec">
<span class="tip">abc</span>
xyz
</span>
This is not content-wise as styling is optional and when not applied
could result in confusing, the least, content.
One source of confusion could be eliminated by adding to
..rec:hover > .tip something like
color: black;
background: yellow;
padding: .1em;
to avoid the default transparency (that would result in text
lying behind interfering)
--
dorayme
.
- Follow-Ups:
- Re: title attribute
- From: fulio pen
- Re: title attribute
- From: fulio pen
- Re: title attribute
- References:
- title attribute
- From: fulio pen
- Re: title attribute
- From: Stanimir Stamenkov
- title attribute
- Prev by Date: Re: title attribute
- Next by Date: Re: Relative URL Problem
- Previous by thread: Re: title attribute
- Next by thread: Re: title attribute
- Index(es):
Relevant Pages
|