Welcome Guest!
Please login
If you do not have an account yet on The Web Squeeze forums, please Register! It’s FREE and there are many benefits:
- Receive Fast Advice
- Learn Programming Languages
- Get Professional Website Reviews
- Quick Troubleshooting Assistance
|
|
Rollovers Problem
This is a discussion on Rollovers Problem, within the HTML/XHTML section. This forum and the thread "Rollovers Problem" are both part of the Designing Your Website category.
![]() ![]() |
Apr 8 2008, 09:16 PM
Post
#1
|
|
![]() Rapid Squeezer ![]() ![]() ![]() ![]() Group: Members Posts: 206 Joined: 15-February 08 From: Plymouth Member No.: 153 |
I have made an unholy mess of trying to create a rollover with css instead of using Dreamweaver.
CODE <div id="backnavigation"><a class="backnavbutton" href="java script:history.go(-1)" ><img src="images/backblk.gif" alt="Go Back One Page" width="50" height="24" style="border:none;" /></a></div> css: CODE #backnavigation { margin-left:145px; text-align:center; padding:10px 0 5px 0 } .backnavbutton a {background:url('images/backblk.gif'); width:50px; height:24px; display:block;} .backnavbutton a:hover {background:url('images/backred.gif'); width:50px; height:24px; display:block;} the margin-left:145px; is so that it clears what's on the left, and surprisingly, I've got that correct because the page is displaying okay with that. What am I doing wrong this time?? The image won't load either. I'm sure that CODE {background:url('images/backblk.gif') is incorrect now that I look at it again.The alt attributes appear, but I can't even get the images to load! I've tried it without the single quote too. Please can someone help me again? Test Website Sorry This post has been edited by Popje: Apr 8 2008, 09:26 PM -------------------- QUOTE I'm challenged enough without any extra weirdness in my life! |
|
|
Apr 8 2008, 09:45 PM
Post
#2
|
|
![]() Squeezing ![]() ![]() ![]() Group: Members Posts: 75 Joined: 14-February 08 Member No.: 86 |
images/backblk.gif does not exist. images/backred.gif does so you must have forgotten to upload the other.
.backnavbutton a means an <a> tag within the .backnavbutton class. But you have the class backnavbutton declared on the <a> so it is not picking up the css. You can use either a.backnavbutton a:hover.backnavbutton which mean class backnavbutton declared on an <a> tag or #backnavigation a #backnavigation a:hover which means <a> tag within id backnavigation. Also you do not need the <img> tag since you have the images defined as background images on <a> in the css. I would use <div id="backnavigation"><a href="java script:history.go(-1)" >Back</a></div> with #backnavigation a I would also remove the "Back" from the image and overlay the <a> text on the background image. |
|
|
Apr 10 2008, 02:50 PM
Post
#3
|
|
![]() Rapid Squeezer ![]() ![]() ![]() ![]() Group: Members Posts: 206 Joined: 15-February 08 From: Plymouth Member No.: 153 |
I tried that and showed the person who wants the rollover, and they didn't like it! No taste!
Thanks for your help with this, I can use it on my own stuff instead! -------------------- QUOTE I'm challenged enough without any extra weirdness in my life! |
|
|
If you found The Web Squeeze to be helpful, please donate so we can keep this site FREE, FRESH, and fortified with Web Design & Development info!
![]() ![]() |
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
Similar Topics
| Topic Title | Replies | Topic Starter | Views | Last Action | |||
|---|---|---|---|---|---|---|---|
![]() |
11 | unitedcraig | 329 | 20th February 2008 - 02:48 AM Last post by: Monie |
|||
![]() |
3 | mcdanielnc89 | 236 | 23rd February 2008 - 08:14 AM Last post by: Marc |
|||
![]() |
6 | karinne | 300 | 20th February 2008 - 06:52 PM Last post by: Stuart |
|||
![]() |
0 | karinne | 218 | 22nd February 2008 - 07:55 AM Last post by: karinne |
|||
![]() |
0 | karinne | 385 | 22nd February 2008 - 07:58 AM Last post by: karinne |
|||






Apr 8 2008, 09:16 PM







