Computing.Net > Forums > Web Development > CSS Fullscreen Background Rollovers

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

CSS Fullscreen Background Rollovers

Reply to Message Icon

Name: chris_digi
Date: September 28, 2005 at 15:54:22 Pacific
OS: Mac / Safari Web Browser
CPU/Ram: G5 1gb ram
Comment:

Does anyone know of a way to change the ENTIRE
background color of a page (not just a cell) on Rollover using CSS?

I would usually do this using Javascript but it does not
work when my page also contains CSS.

Thanks Kindly.

Christine 'Digital'



Sponsored Link
Ads by Google

Response Number 1
Name: Michael J (by mjdamato)
Date: September 29, 2005 at 09:08:02 Pacific
Reply:

You can't do it with CSS alone, you need javascript as well. Copy and paste this into a new document as an example:

<html>
<head>
<script language="javascript">
function change(val) {
document.getElementById(val).style.backgroundColor = '#000000';
}
</script>
</head>
<body id='body'>
<span onMouseOver="change('body');">Mouse over me</span>
</body>
</html>

Michael J


0
Reply to Message Icon

Related Posts

See More


Interactive Drop-Down Men... checking POP mail through...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Web Development Forum Home


Sponsored links

Ads by Google


Results for: CSS Fullscreen Background Rollovers

Background graphics www.computing.net/answers/webdevel/background-graphics/1629.html

Webpage Backgrounds in Frontpage www.computing.net/answers/webdevel/webpage-backgrounds-in-frontpage/1391.html

Simple CSS help? www.computing.net/answers/webdevel/simple-css-help/228.html