css hover not working in IE

Discussion in 'HTML' started by saurabh9, Sep 29, 2008.

  1. saurabh9

    saurabh9 Guest

    saurabh9, Sep 29, 2008
    #1
    1. Advertising

  2. 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
     
    Adrienne Boswell, Sep 29, 2008
    #2
    1. Advertising

  3. saurabh9

    Els Guest

    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/
     
    Els, Sep 29, 2008
    #3
  4. saurabh9

    saurabh9 Guest

    On Sep 29, 6:52 pm, Els <> 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?
     
    saurabh9, Sep 29, 2008
    #4
  5. saurabh9

    Els Guest

    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/
     
    Els, Sep 29, 2008
    #5
  6. 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)
     
    Thomas Mlynarczyk, Sep 29, 2008
    #6
  7. saurabh9

    richard Guest

    On Mon, 29 Sep 2008 07:06:41 -0700 (PDT), saurabh9
    <> wrote:

    >On Sep 29, 6:52 pm, Els <> 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.
     
    richard, Sep 29, 2008
    #7
  8. 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
     
    Jonathan N. Little, Sep 29, 2008
    #8
  9. saurabh9

    dorayme Guest

    In article
    <>,
    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
     
    dorayme, Sep 29, 2008
    #9
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Erik Harris

    CSS :hover and Internet Explorer 6?

    Erik Harris, Jun 25, 2003, in forum: HTML
    Replies:
    6
    Views:
    78,722
    Erik Harris
    Jun 26, 2003
  2. Shannon
    Replies:
    1
    Views:
    426
    brucie
    Jul 26, 2003
  3. Jochen Fuhrmann

    css: a:hover and images

    Jochen Fuhrmann, Sep 18, 2003, in forum: HTML
    Replies:
    6
    Views:
    7,224
    William Tasso
    Sep 18, 2003
  4. John
    Replies:
    1
    Views:
    2,078
    Adrienne Boswell
    Sep 16, 2008
  5. dreamee

    CSS hover image link not working in IE

    dreamee, Oct 1, 2011, in forum: HTML and CSS
    Replies:
    0
    Views:
    1,614
    dreamee
    Oct 1, 2011
Loading...

Share This Page