Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 5 of 5
  1. #1
    Member
    Join Date
    Feb 2005
    Location
    Portland, Oregon
    Posts
    93
    Member #
    8959
    hello guys,

    i have a question regarding to cursor, onmouseout, onclick, etc.

    i have inputed them in the html like this...
    <div class="box" style="cursorointer;cursor:hand" onmouseover="this.style.backgroundColor = '#F7F6F3'" onmouseout="this.style.backgroundColor = '#FFFFFF'" onclick="document.location = '082205.pdf'">
    <h3>Marketing Update for August 22&ndash;28, 2005</h3><br />

    the problem is that i do not want to input on every one of those div boxes with this style of cursor, onmouse and on. i want to be able to input all of this in the CSS under the 'div class' of "box". is that possible in due to doing this to save tons of time?

    thanks!
    -ardia

  2.  

  3. #2
    Senior Member
    Join Date
    May 2005
    Location
    Essex, United Kingdom
    Posts
    200
    Member #
    10131
    Do this
    Code:
    CSS:
    .box a:link {
    background-color:#FFF;
    }
    .box a:hover {
    background-color:#F7F6F3;
    }
     
    HTML:
    <div class="box">
    <a href="082205.pdf"><h3>Marketing Update for August 22&ndash;28, 2005</h3><br />
    </div>
    I have removed the onclick event as this was javascript and this alternative is much more compatible and a much better way of doing this.

  4. #3
    Member
    Join Date
    Feb 2005
    Location
    Portland, Oregon
    Posts
    93
    Member #
    8959
    didnt quite get it to work as i wanted. um, i want it to highlight in the entire box, not per line.

    you can see what i mean at http://www.ardia.org/flyerstest.htm
    second is how its supposed to display, with alernativing of coloring inside when rolling the mouse over.

  5. #4
    Senior Member Fallout's Avatar
    Join Date
    Aug 2003
    Location
    Richmond, Virginia
    Posts
    543
    Member #
    2748
    You'll have to use JS because IE won't recognize a :hover class on anything but a link.

  6. #5
    Senior Member hyperair's Avatar
    Join Date
    May 2005
    Posts
    452
    Member #
    9892
    just make 2 separate classes, one for mouseover and one for when its not. then use javascript.

    <div class="normal" onmouseover="this.setAttribute('class','hovered')" onmouseout="this.setAttribute('class','normal')"></div>

    that should help you when you want to make mass changes to your page.
    Hyperair


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 04:58 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com