hover image repeating on me

This is a discussion on "hover image repeating on me" within the Web Page Design section. This forum, and the thread "hover image repeating on me are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Dec 7th, 2005, 11:26
Junior Member
Join Date: Aug 2005
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
hover image repeating on me

I've made this css rollover button by using a background image behind some text, and sticking left and right ends on to make it rounded.
It works great except that, on the hover, the image across the central part decides to repeat vertically, in both IE and FF. Any ideas how to get it right?
Have a look:
http://www.aocd00.dsl.pipex.com/buttons.html
Here's the code:
Code: Select all
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html>
<head>
<title>12345 12345 12345 12345 12345</title>
<style type="text/css">
<!--
.left,.right{width:46px;height:46px;float:left;}
.left{background: white url(up_left.gif) no-repeat;}
.right{background: white url(up_right.gif) no-repeat;}
.middle{float:left;padding:10px 0 0 0;margin:0;background: url(up_mid.gif); background-repeat: repeat-x; height:46px;}
.wholebutton a:hover {background:url(x.jpg);}
.wholebutton a:hover .right{background:white url(down_right.gif);}
.wholebutton a:hover .left{background:white url(down_left.gif);}
.wholebutton a:hover .middle{background:white url(down_mid.gif);}
.wholebutton a{text-decoration:none;}
.wholebutton b{
text-decoration:underline;
cursor:hand;
color:#000000;
font-weight:100;
font-family:Verdana, Arial, Geneva, Helvetica, sans-serif;
font-size:12px;
}
 -->
</style>
</head>
<body>
<div class="wholebutton">
<a href="##">
<b class="left"></b><b class="middle">I've got a luvverly bunch of coconuts</b><b class="right"></b>
</a>
</div>
</body>
</html>
Reply With Quote

  #2 (permalink)  
Old Dec 7th, 2005, 13:41
herkalees's Avatar
Highly Reputable Member
Join Date: Jul 2005
Location: Massachusetts, USA
Age: 87
Posts: 576
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to herkalees Send a message via MSN to herkalees Send a message via Yahoo to herkalees
Re: hover image repeating on me

Have you tried adding the value "no-repeat;" to the selector? Like this:

.wholebutton a:hover {background:url(x.jpg) no-repeat;}
Reply With Quote
Reply

Tags
hover, image, repeating

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
swap more than 1 image on hover apos JavaScript Forum 2 May 9th, 2007 17:12
Repeating an image along the bottom of the page without setting it as background. imagius Web Page Design 9 Apr 27th, 2007 08:35
Image - Expand on Hover beso Flash & Multimedia Forum 16 Oct 7th, 2006 06:02
Swap Background Image on Hover Andy K Web Page Design 1 Feb 8th, 2006 15:11


All times are GMT. The time now is 03:00.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43