CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignCSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 10th, 2003, 03:30 PM
duwgati duwgati is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 98 duwgati User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 h 46 m 58 sec
Reputation Power: 5
Problem with CSS hover buttons in NS/Mozilla

I searched the forum (and several others) but could not find the answer.

I guess it is best if you look at the test-page I created. You can see the different behaviour in IE vs NS/Mozilla. In IE the buttons are displayed properly, but in NS/Mozilla they are not.
testpage

This is the code I use in the style sheet:
a.button:active, a.button:link, a.button:visited {
font-family: Tahoma, Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size: 8pt;
color: Black;
text-decoration: none;
text-align: center;
font-weight : normal;
line-height : 18px;
width : 123px;
background-image : url(button.png);
}
a.button:hover {
color: White;
line-height : 18px;
width : 123px;
background-image : url(button_over.png);
}


Can anybody tell me if it could be done in NS/Mozilla like it is in IE?

Thanks
Duwgati

Reply With Quote
  #2  
Old October 11th, 2003, 04:32 AM
Akh's Avatar
Akh Akh is offline
|<.+#f@#+.&.|
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2002
Location: norway
Posts: 2,622 Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 3 Weeks 6 Days 2 h 19 m 51 sec
Reputation Power: 548
you can't set width to a inline element,
so ns/mozilla are displaying it right
(another bug in ie )

use display:block; in the css to be able to
set a width

Code:
a.button:active, a.button:link, a.button:visited {
	display:block;
	font-family: Tahoma, Verdana, Geneva, Arial, Helvetica, sans-serif;
	font-size: 8pt;
	color: Black;
	text-decoration: none;
	text-align: center;
	font-weight : normal;
	line-height : 18px;
	width : 123px;
	background-image : url(button.png);
}

Reply With Quote
  #3  
Old October 11th, 2003, 11:50 AM
duwgati duwgati is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 98 duwgati User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 h 46 m 58 sec
Reputation Power: 5
Thanks a lot Akh,
although it's a damn shame if you ask me. I would rather call that a feature instead of a bug

But your solution works just fine, except that it does solve the display problem, but introduces a new problem at the same time.

I want the buttons lined up with no more than 2px space between them, because that's all the space I have for them. So how do I do that with the block attribute?

Reply With Quote
  #4  
Old October 11th, 2003, 12:53 PM
Akh's Avatar
Akh Akh is offline
|<.+#f@#+.&.|
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2002
Location: norway
Posts: 2,622 Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 3 Weeks 6 Days 2 h 19 m 51 sec
Reputation Power: 548
lined up horisontal or vertical?

i recon you have removed the <br> tags?

you can use float:left to get the one one line.

Reply With Quote
  #5  
Old October 11th, 2003, 01:03 PM
duwgati duwgati is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 98 duwgati User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 h 46 m 58 sec
Reputation Power: 5
Oops, "float : left" ..... should have thought of that myself.
Anyway, your help was invaluable.
Thanks so much.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > Problem with CSS hover buttons in NS/Mozilla


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway