473,683 Members | 3,573 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Can you have a hover effect on a TD in IE?

I can not get hover effect on a TD to work in IE, it seams you can not
have
a hover on a td in IE?

I have treid this

body.section-2 td.current,
body.section-2 td.submenu,
body.section-2 td.bredtsubmenu mellemrumhojre,
body.section-2 td.bredtsubmenu mellemrumvenstr e {
background-color: #ffc233;

}

body.section-2 td.submenucurre nt {
background-color: #ffcc66;

}

body.section-2 td.submenu:hove r {
background-color: #ffcc66;

}

and this

body.section-2 td.current,
body.section-2 td.submenu,
body.section-2 td.bredtsubmenu mellemrumhojre,
body.section-2 td.bredtsubmenu mellemrumvenstr e {
background-color: #ffc233;

}

body.section-2 td.submenucurre nt,
body.section-2 td.submenu:hove r {
background-color: #ffcc66;

}

Which works in firefox, but not in IE.

Then I treid setting the hover effect on the link, like this.

a.submenulink:h over {
background-color: #ff0000;

}

But then the entire cell is not filled out.

Can you see a fix for this problem?

Se problem here http://madsgormlarsen.dk/andersen/
Mads

Aug 8 '05
51 12227
Embed an <a> in it and set the <a>'s width to 100%
Then base all your CSS selectors around a:hover


Well, does not work in this case, acutally it seams to make the link
vider than the td! But in this case it is also a height problem, not a
width problem, the a:hover does not fill out the height of the TD. And
height 100% does not do anyting.

Mads

Aug 12 '05 #11
ma************@ gmail.com schreef:
Well, does not work in this case, acutally it seams to make the link
vider than the td! But in this case it is also a height problem, not a
width problem, the a:hover does not fill out the height of the TD. And
height 100% does not do anyting.


Add "display: block" to the style for the a-tag (you don't need the td
at all for adding layout to a page, but we all knew that right?)

--
Niek Emmen, Sitebuilder
Sebastian Webprojecten, http://www.sebastian.nl
Aug 12 '05 #12
Els
ma************@ gmail.com wrote:
Now I may be mistaken, but weren't you the person who after some
instructions understood how to quote when replying to a message?
Hi Els

Yes, I am guilty as charged, I am that surden someone, and I will
qoute, I promisse I will qoute. I feel ashamed of myself, I have been
sinful.


Apology accepted. Now be a good boy from now on :-)
Where have you been, I have missed your participation in this
discussion. Hope you will enligtend me, on this problem.
The answer I would give, has already been given by others:
td a{
display:block;
width:100%;
}

If that still looks wider than the TD, you probably have to set some
margins and/or paddings to 0.
Mads
tj 91 192


What do those numbers stand for?

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Aug 12 '05 #13
Add "display: block" to the style for the a-tag (you don't need the td
at all for adding layout to a page, but we all knew that right?)


I have already added block, but there must be som margin padding which
gives a problem. I have treid to make a tabel-less css menu, but I
could not get it to work, and I have yet to find one that does.

compare these two tabel-less menu

www.eniro.dk/cimg/p.gif

http://labs.silverorange.com/images/...ate/about.html

to mine. I you scale them up, you will see that mine does a lot better.
Mads

Aug 12 '05 #14
Apology accepted. Now be a good boy from now on :-)
As you can see, I am qouting wildly, so I am making amends.
The answer I would give, has already been given by others:
td a{
display:block;
width:100%;
}
If that still looks wider than the TD, you probably have to set some
margins and/or paddings to 0.


I will try that, but it looks a lot wider, and it the problem is the
height. The javascript works, but it does not really work no well with
the rest of my setup (meaning - colour coding set by body tag and css)

tj 91 192


What do those numbers stand for?


Well I figured no one would notice, it was just a quick note for
myself. But it is the car number of someone that went in and took my
neigbours lawn mover! - just in case they were steellling it. I let you
know if it was a grand theft lawn mobile :-)

Aug 12 '05 #15
ma************@ gmail.com schreef:
compare these two tabel-less menu

www.eniro.dk/cimg/p.gif
I asume you meant http://www.eniro.dk

http://labs.silverorange.com/images/...ate/about.html

to mine. I you scale them up, you will see that mine does a lot better.


Take a look at how the menu is built, it uses <ul> an <li> for the tabs.
You've got a perfect combination of html and css when you use that
(handheld-pc's and such will display the menu s an unordered list, which
is excellent).

Look at a page I made like:
http://www.bredeschooltilburg.nl/ind...=12&d=72&p=351

that's a similar method.

--
Niek Emmen, Sitebuilder
Sebastian Webprojecten, http://www.sebastian.nl
Aug 12 '05 #16
I asume you meant http://www.eniro.dk
Well, no is was a total miss I meant

http://kalsey.com/2003/05/css_tabs_with_submenus/
Take a look at how the menu is built, it uses <ul> an <li> for the tabs.
You've got a perfect combination of html and css when you use that
(handheld-pc's and such will display the menu s an unordered list, which
is excellent).


Yes, that is indeed excellent, but you need to control the elements as
best as possible, and at the same time make the solution scalable. None
of the tabel-less solution I have seen can do that. I found myself
being rather disapointed in css, because it so dependent on the
browser, so from my experience table control is still better. Now it is
all fine about telephones and so forth, but how about OLD browsers -
what if you have a sight were there is a good chance of a win98 user
with a old browser stopping by, what will give the best result in such
a situation? Especially when were a taking about a menu, something like
a long list based on ul and li is not really better than a table? But
be asured I treid, could not get it to work. I am definatly not saying
your wrong, but I just don´t think css i quite there yet.

Mads

Aug 12 '05 #17
ma************@ gmail.com schreef:
I found myself
being rather disapointed in css, because it so dependent on the
browser, so from my experience table control is still better.
Hang in there, I bet your first experiences with plain old HTML were
even worse, mine were!
It's a learning-curve you have to take, and then there's sun, light,
beauty, bottles of beer that never empty...
sorry it's almost weekend :-)
Now it is
all fine about telephones and so forth, but how about OLD browsers -
what if you have a sight were there is a good chance of a win98 user
with a old browser stopping by, what will give the best result in such
a situation? Especially when were a taking about a menu, something like
a long list based on ul and li is not really better than a table?
Users with old browser still see the <UL>-formatted list, so they can
read the page. You can't expect that drivers with cars from the 1920's
can keep up on the freeway!
But
be asured I treid, could not get it to work. I am definatly not saying
your wrong, but I just don´t think css i quite there yet.


As said, hang in there!

--
Niek Emmen, Sitebuilder
Sebastian Webprojecten, http://www.sebastian.nl
Aug 12 '05 #18
Hang in there, I bet your first experiences with plain old HTML were
even worse, mine were!
It's a learning-curve you have to take, and then there's sun, light,
beauty, bottles of beer that never empty...
sorry it's almost weekend :-)


Well, I would be more optimistic if I could find an exsample that
works. The two exsamples I have given are tabel-less, and based
totattly on css, but none of them scale very well. All css based
menu´s I have seen either dont scale at all, or they totally screw up
the design as soon as you doo. - (or they are very simple and without
submenus)

You can try your own menu, if you scale it once, then the menu divides
in to two rather confusing lines. Compare that to mine, you can make it
as big as you want, scales perfecly to any size. Yes, there is a good
reason to want to make tabel less menu, but to me, being able to scale
is a major part of the advantage of text based menus.

Mads

Aug 12 '05 #19
ma************@ gmail.com schreef:
Hang in there, I bet your first experiences with plain old HTML were
even worse, mine were!
It's a learning-curve you have to take, and then there's sun, light,
beauty, bottles of beer that never empty...
sorry it's almost weekend :-)

Well, I would be more optimistic if I could find an exsample that
works. The two exsamples I have given are tabel-less, and based
totattly on css, but none of them scale very well. All css based
menu´s I have seen either dont scale at all, or they totally screw up
the design as soon as you doo. - (or they are very simple and without
submenus)


It depends on how the width of the div's are defined, if you use
percentages, the site will scale allright.

You still can put the construction od the site in one table, as I did in
my example (http://www.bredeschooltilburg.nl/ind...=12&d=72&p=351)
That's a good way to start, if you make the cell containing the UL-based
menu liquid (I used exact measures) the site will scale pretty good.

Remember: you don't build a CSS-only site, you use CSS to define the
layout of tags like div, h1, h2, h3, p, img and td as well.

You can try your own menu, if you scale it once, then the menu divides
in to two rather confusing lines.


? Don't know what you mean. But hey that could be the
never-empty-bottle-off-beer working :-)

--
Niek
Aug 12 '05 #20

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

Similar topics

6
17483
by: Nikolaos Giannopoulos | last post by:
If I have simplified html (I have removed height, weight, alt, etc... attributes to simplify the example) such as: <div id="header"> <a href="blah.html"><img src="img/blah.jpg"></a> </div> and the following CSS rule to apply a background color to text links on hover:
12
6612
by: CJM | last post by:
Is it possible to achieve a hover effect for a non-anchor tag in CSS? I can use the following code, but it goes against the grain: <a href="" onclick="return false;">Label</a> Surely there must be a 'proper' way of doing it? Thanks Chris
2
1980
by: Philip Herlihy | last post by:
I'm getting this bizarre effect in IE6 (not in Firefox, etc). When you hover over the "back" or "next" links, adjacent images are cropped at that vertical level and the page redisplays with that point at the bottom. http://www.walthamsoft.com/assist/2.htm (This page, at least, validates. Don't look much further or you'll see things that will make you shudder at their ineptitude - I'm still learning CSS!) I don't see this effect in...
15
5840
by: artev | last post by:
IE support :hover only on A (anchor) element. Is there a solution for resolve this problem? I would like to use :hover on LI element.
2
4167
by: skipc | last post by:
I posted a recent message regarding navigating a table using arrow keys. I've got the code for the navigation working. My table contains rows of links (anchors). I can get to a specific link using the code for capturing a key. However, once I get to the link, I can focus(), for example... but what I really want is to activate the "hover" styles. I can fake the hover effect using javascript, but how do I do this and still allow the...
13
4803
by: windandwaves | last post by:
Hi Folk Just a bit of help here for newbies who want their menus to look nicer. I am sure that many of you make menus like this <ul id="menu"> <li><a href="page1.html">option 1</a></li> <li><a href="page2.html">option 2</a></li> <li><a href="page3.html">option 3</a></li>
24
2270
by: Fred Lock | last post by:
Hello, I have a page with a usual mouseover link highlight effect eg.: a:hover {color: #ff0000; text-decoration: none;} I also have some anchor links such as: <a href="#jalfrezi">Jalfrezi</a> | <a href="#vindaloo">Vindaloo</a> | etc...
10
4699
by: tomasio | last post by:
Dear Pros, How can I achieve a nicer hover-effect for the image tomasio.design on the bottom-right of my webpage? I am using the class ".footer a:hover" for a CSS-based mouseover-effect but this causes an ugly green block to the left of the image while hovering the mousepointer over it. I just want to link that image to my index-page, without any mouseover effect if possible. Any hints? Plus I get an error message from the...
1
1776
by: tomasio | last post by:
Dear Pros, How can I achieve a nicer hover-effect for the image "tomasio.design" on the bottom-right of my webpage? I am using the class ".footer a:hover" for a CSS-based mouseover-effect but this causes an ugly green block to the left of the image while hovering the mousepointer over it. I just want to link that image to my index-page, without any mouseover effect if possible. Any hints? Plus I get an error message from the...
0
8568
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8504
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9043
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8922
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7582
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6429
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5789
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4299
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4519
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.