css hover not working in IE

A

Adrienne Boswell

Gazing into my crystal ball I observed saurabh9 <[email protected]>
writing in (e-mail address removed):
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.
 
E

Els

saurabh9 said:
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.
 
S

saurabh9

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.

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?
 
E

Els

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.
 
R

richard

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.
 
J

Jonathan N. Little

richard said:
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: said:
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">...
 
D

dorayme

saurabh9 said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top