Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > css hover not working in IE

Reply
Thread Tools

css hover not working in IE

 
 
saurabh9
Guest
Posts: n/a
 
      09-29-2008
I am trying to make a row change color on hover. The css is working
fine in Firefox, but not in IE. Can anybody have a look please?

The site is at http://www.saurabhkumar.com/rac/forms/form2.php

Thanks.
 
Reply With Quote
 
 
 
 
Adrienne Boswell
Guest
Posts: n/a
 
      09-29-2008
Gazing into my crystal ball I observed saurabh9 <>
writing in news:7c3a73a1-302f-424f-8ef1-
:

> I am trying to make a row change color on hover. The css is working
> fine in Firefox, but not in IE. Can anybody have a look please?
>
> The site is at http://www.saurabhkumar.com/rac/forms/form2.php
>
> Thanks.
>


And it's going to fail miserably for users without javascript enabled.
Javascript should be an enhancement, not vital to the page.


--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share

 
Reply With Quote
 
 
 
 
Els
Guest
Posts: n/a
 
      09-29-2008
saurabh9 wrote:

> I am trying to make a row change color on hover. The css is working
> fine in Firefox, but not in IE. Can anybody have a look please?
>
> The site is at http://www.saurabhkumar.com/rac/forms/form2.php


Looking at your stylesheet I see float:centre;
That doesn't actually exist. Float has left or right, no center.

Also, you are defining font-size in pixels - this means they won't be
resizable for a large part of the visitors. It's better to use %,
where 100% is the visitor's default font-size.

As for the problem you are asking about, IE6 can only understand
:hover on <a href...>, not on any other element. In IE7 it works fine.

--
Els http://locusmeus.com/
 
Reply With Quote
 
saurabh9
Guest
Posts: n/a
 
      09-29-2008
On Sep 29, 6:52*pm, Els <els.aNOS...@tiscali.nl> wrote:
> saurabh9 wrote:
> > I am trying to make a row change color on hover. The css is working
> > fine in Firefox, but not in IE. Can anybody have a look please?

>
> > The site is athttp://www.saurabhkumar.com/rac/forms/form2.php

>
> Looking at your stylesheet I see float:centre;
> That doesn't actually exist. Float has left or right, no center.
>
> Also, you are defining font-size in pixels - this means they won't be
> resizable for a large part of the visitors. It's better to use %,
> where 100% is the visitor's default font-size.
>
> As for the problem you are asking about, IE6 can only understand
> :hover on <a href...>, not on any other element. In IE7 it works fine.
>
> --
> Els * * * * * * * * * *http://locusmeus.com/


I put the size in px because the requirement is that the table should
not be wider than 800px. Can I implement this requirement in a better
way?
 
Reply With Quote
 
Els
Guest
Posts: n/a
 
      09-29-2008
saurabh9 wrote:

>> Also, you are defining font-size in pixels - this means they won't be
>> resizable for a large part of the visitors. It's better to use %,
>> where 100% is the visitor's default font-size.


> I put the size in px because the requirement is that the table should
> not be wider than 800px. Can I implement this requirement in a better
> way?


Tell the requirement-person which they prefer: stick to 800px width
always, or have people be able to read their form.

Also, setting font-size in pixels only has effect in IE - in Firefox
and Opera for example, even the pixel sized fonts resize when the user
wants them to.

--
Els http://locusmeus.com/
 
Reply With Quote
 
Thomas Mlynarczyk
Guest
Posts: n/a
 
      09-29-2008
saurabh9 schrieb:
> I am trying to make a row change color on hover. The css is working
> fine in Firefox, but not in IE.


IE<7 does not support :hover on anything but <a>. There is, however, a
JavaScript based solution using IEs proprietary behaviour property:

http://www.xs4all.nl/~peterned/csshover.html

Greetings,
Thomas


--
Ce n'est pas parce qu'ils sont nombreux à avoir tort qu'ils ont raison!
(Coluche)
 
Reply With Quote
 
richard
Guest
Posts: n/a
 
      09-29-2008
On Mon, 29 Sep 2008 07:06:41 -0700 (PDT), saurabh9
<> wrote:

>On Sep 29, 6:52*pm, Els <els.aNOS...@tiscali.nl> wrote:
>> saurabh9 wrote:
>> > I am trying to make a row change color on hover. The css is working
>> > fine in Firefox, but not in IE. Can anybody have a look please?

>>
>> > The site is athttp://www.saurabhkumar.com/rac/forms/form2.php

>>
>> Looking at your stylesheet I see float:centre;
>> That doesn't actually exist. Float has left or right, no center.
>>
>> Also, you are defining font-size in pixels - this means they won't be
>> resizable for a large part of the visitors. It's better to use %,
>> where 100% is the visitor's default font-size.
>>
>> As for the problem you are asking about, IE6 can only understand
>> :hover on <a href...>, not on any other element. In IE7 it works fine.
>>
>> --
>> Els * * * * * * * * * *http://locusmeus.com/

>
>I put the size in px because the requirement is that the table should
>not be wider than 800px. Can I implement this requirement in a better
>way?



Define the table width as 800 pixels.
In css you can show table {width:800px} or <table width="800px">.
no dot or # before table in css.
 
Reply With Quote
 
Jonathan N. Little
Guest
Posts: n/a
 
      09-29-2008
richard wrote:

> Define the table width as 800 pixels.
> In css you can show table {width:800px}


Correct CSS syntax

> or <table width="800px">.


Wrong HTML syntax, HTML attribute's do not have units except '%'

Correct deprecated method: <table width="800">

> no dot or # before table in css.


True when specifying an type selector:

table { /* styles TABLE element */ }

You could have a class or id table, although probably not a very good
idea...

Class selector:
..table {/* styles elements of class 'table' */}

e.g., <div class="table">... or <ul class="table">...

ID selectors:
#table {/* styles elements of id 'table' */}

e.g., <div id="table">... or <ul id="table">...


--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
 
Reply With Quote
 
dorayme
Guest
Posts: n/a
 
      09-29-2008
In article
<f5bf6c09-79fd-49fa-a904->,
saurabh9 <> wrote:

> I put the size in px because the requirement is that the table should
> not be wider than 800px. Can I implement this requirement in a better
> way?


Allowing the font size to be whatever most users wants does not
necessarily mean the table has to go beyond 800px because there is a
mechanism called wrapping within table cells that will kick in to take
care of most situations.

--
dorayme
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CSS hover image link not working in IE dreamee HTML 0 10-01-2011 03:46 PM
CSS navigation bar - hover OK in Firefox but not in Internet Exploter 7 John HTML 1 09-16-2008 03:56 PM
css: a:hover and images Jochen Fuhrmann HTML 6 09-18-2003 01:25 PM
CSS hover: sepcifying color without background? Shannon HTML 1 07-26-2003 10:18 PM
CSS :hover and Internet Explorer 6? Erik Harris HTML 6 06-26-2003 09:33 PM



Advertisments