473,396 Members | 1,942 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Inline-Element with higher font-size inside A: Hover about full height?

Hi,

what is the task with which I could not cope?

There is a link with an inline-element (strong e.g.) inside. It has a
higher font-size than the content of its parent.

For the hover effect I prefer an inverse styling.

Hovering should just cover the link and not his parent (li e.g.).

My question:
How could one realize a hovering about the full height of the
inline-element with a higher font-size than it's parent?
I search for a solution which works well on actual(tm) browsers.

In the following you find a screenshot, the code and a testcase with
the code.

Thank you.

Screenshot:
http://borumat.de/bilder/misc/temp/hc-083.png

Code:
| strong{
| font-size: 2em;
| }
| a{
| text-decoration: none;
| }
| a:link{
| color: blue;
| background: white;
| }
| a:link:hover{
| background: blue;
| color: white;
| }
| a:visited{
| color: red;
| background: white;
| }
| a:visited:hover{
| background: red;
| color: white;
| }

| <ul>
| <li><a href="#a">Lorem <strong>ipsum</strongdolor<br />
| sit amet</a></li>
| <li><a href="#b">Consectetur adipisicing elit<br />
| sed <strong>do</strongeiusmod
| tempor</a></li>
| <li><a href="#c">Incididunt ut <strong>labore</strong><br />
| et dolore magna aliqua</a></li>
| </ul>

Testcase:
http://borumat.de/html/temp/hover-ni...olle-hoehe.php

Andreas
--
http://borumat.de/firefox-browser-tipps
http://borumat.de/thunderbird-email-tipps
http://borumat.de/openoffice-writer-tipps
http://borumat.de/40tude-dialog-newsreader-tipps
Nov 22 '06 #1
4 2949
Scripsit Andreas Borutta:
Hi,

what is the task with which I could not cope?
The task of getting to the point in the first sentence, I presume.
There is a link with an inline-element (strong e.g.) inside. It has a
higher font-size than the content of its parent.
Remove the tag or rule that causes the higher font size. Problem solved.
For the hover effect I prefer an inverse styling.
Huh? Why not reverse or perverse? What is "inverse styling"?
Hovering should just cover the link and not his parent (li e.g.).
And your problem with that is exactly what?
My question:
How could one realize a hovering about the full height of the
inline-element with a higher font-size than it's parent?
So you actually have a CSS question, not HTML? Well, the right answer is
still: stop creating the problem. (Besides, I still don't see what you see
as a problem here. Font size changes inside text are usually problem, but
I'm afraid you don't mean that.)
http://borumat.de/bilder/misc/temp/hc-083.png
Oh. There I can see a problem, but there's no indication of where (on which
browser) it happens. And the solution is to remove the pointless font size
change.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Nov 22 '06 #2
Jukka K. Korpela schrieb:
>For the hover effect I prefer an inverse styling.

Huh? Why not reverse or perverse? What is "inverse styling"?
Swapping color and background color.
>My question:
How could one realize a hovering about the full height of the
inline-element with a higher font-size than it's parent?

So you actually have a CSS question, not HTML?
Yes.
Well, the right answer is
still: stop creating the problem.
I prefer the view of "solving a task".
>(Besides, I still don't see what you see
as a problem here.
Later you point out, that you see it - in the screenshot.

In words, to be sure: the upper part of strong is not hovered. With
the used style for hovering the upper part is not readible.
Font size changes inside text are usually problem
I like to use this type of emphasizing for a special purposes, not
alway it usual continuous text.

I think of it to emphasize the main keywords inside the linktexts
inside a list of a dozen of links in a linklist.
>http://borumat.de/bilder/misc/temp/hc-083.png

Oh. There I can see a problem, but there's no indication of where (on which
browser) it happens.
It happens on FF 2.0 and Opera 9
And the solution is to remove the pointless font size
change.
I know now, that you don't like the styling.

Andreas
--
http://borumat.de/firefox-browser-tipps
http://borumat.de/thunderbird-email-tipps
http://borumat.de/openoffice-writer-tipps
http://borumat.de/40tude-dialog-newsreader-tipps
Nov 22 '06 #3
Andreas Borutta schrieb:
How could one realize a hovering about the full height of the
inline-element with a higher font-size than it's parent?
It seems to me that no "clean" solution exists: I will use "markup
layout" in form of SPANs as long as I know a better solution.

| body { background : white; color : black; }
| a{ font-size : 2em; color: blue; }
| a:hover{ background : blue; color : white; }
| li{ line-height : 2.3em; }
| span{ font-size : .5em; }

| <p><a href="#a"><span>Lorem </span><strong>ipsum</strong></a></p>

http://borumat.de/html/temp/hover-ue...-elementen.php

Sorry for my missposting in this group.
Next time I will post an issue about stylesheets in
comp.infosystems.www.authoring.stylesheets

Andreas
--
http://borumat.de/firefox-browser-tipps
http://borumat.de/thunderbird-email-tipps
http://borumat.de/openoffice-writer-tipps
http://borumat.de/40tude-dialog-newsreader-tipps
Nov 24 '06 #4
Andreas Borutta schrieb:
How could one realize a hovering about the full height of the
inline-element with a higher font-size than it's parent?
It seems to me that no "clean" solution exists: I will use "markup
layout" in form of SPANs as long as I know a better solution.

| body { background : white; color : black; }
| a{ font-size : 2em; color: blue; }
| a:hover{ background : blue; color : white; }
| span{ font-size : .5em; }

| <p><a href="#a"><span>Lorem </span><strong>ipsum</strong></a></p>

http://borumat.de/html/temp/hover-ue...-elementen.php

Sorry for my missposting in this group.
Next time I will post an issue about stylesheets in
comp.infosystems.www.authoring.stylesheets

Andreas
--
http://borumat.de/firefox-browser-tipps
http://borumat.de/thunderbird-email-tipps
http://borumat.de/openoffice-writer-tipps
http://borumat.de/40tude-dialog-newsreader-tipps
Nov 24 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: A | last post by:
Hi, I'm having problems completing a project in C++. I have been using inline functions in some of my header files. I have only done so for simple functions that only have 1 statement (eg....
47
by: Richard Hayden | last post by:
Hi, I have the following code: /******************************** file1.c #include <iostream> extern void dummy(); inline int testfunc() {
20
by: Grumble | last post by:
Hello everyone, As far as I understand, the 'inline' keyword is a hint for the compiler to consider the function in question as a candidate for inlining, yes? What happens when a function with...
7
by: Srini | last post by:
Hello, Rules for inline functions say that they have to be defined in the same compilation unit as their declarations. For class member functions this means that the inline member functions must...
6
by: RainBow | last post by:
Greetings!! I introduced the so-called "thin-template" pattern for controlling the code bloat caused due to template usage. However, one of the functions in the template happens to be virtual...
9
by: chinu | last post by:
hi all, i did a small experiment to grasp the advantages of declaring a function as inline. inline int fun1(); int main(){ unsigned int start=0,end=0; asm("rdtsc\n\t"
12
by: sam_cit | last post by:
Hi Everyone, I have few questions on inline functions, when i declare a function as inline, is it for sure that the compiler would replace the function call with the actual body of the function?...
5
by: Barry | last post by:
Hi, group First, I write same cases I've already known, I don't concern that specific compiler really do inline or not. Please check them if they are right, and add the cases I miss 1. //...
2
by: Barry | last post by:
Hi, group First, I write same cases I've already known, I don't concern that specific compiler really do inline or not. Please check them if they are right, and add the cases I miss 1. //...
9
by: Martin Wells | last post by:
Is there anything like __inline_is_supported to indicate whether a certain C compiler supports inline? I'm writing my code as fully portable C89, but I want to use inline. Martin
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.