Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
firefox text-align problem
Old 01-20-2008, 11:24 AM firefox text-align problem
Junior Talker

Posts: 3
Trades: 0
heya

i have a css hover button:

Code:
 <a href="#" id="tour"></a>
#tour{
    display:block;
    width:150px;
    height: 42px;
    margin: 0;
    padding: 0px 0px 0px 0px;
    background-position: -150px 0;
    background-image: url(tour.png);
    }

#tour: hover{
    background-position: 0 0;
    }
This is contained in a div with the property "text-align: center", but it doesn't center in firefox, although it does in IE. If I change the display property to inline it centers nicely, but the height and width constraints are lost...

thanks
amitie is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 01-20-2008, 12:20 PM Re: firefox text-align problem
blue-dreamer's Avatar
King Spam Talker

Posts: 1,222
Location: Middle England
Trades: 0
have you set a width for the parent div?
blue-dreamer is offline
Reply With Quote
View Public Profile
 
Old 01-20-2008, 02:07 PM Re: firefox text-align problem
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
Do you only have one link that's going to be using that ID ?? If not, you're going to run into trouble because ID's MUST be unique - you cannot re-use them on the same page. If you must re-use the rules, use a class instead.

Put the text-align: center property on the <li> or <a> rather than the div. IE tends to be VERY sloppy in the way it applies CSS - thanks to it's non-standard compliant nature.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 01-20-2008, 07:01 PM Re: firefox text-align problem
Junior Talker

Posts: 3
Trades: 0
ye, there is only 1 link using the ID.

LadynRed thanks for the suggestion! I just tried it, but it still doesn't work . I think it must have something to do with the display property, because if I set it to inline it centers nicely (but loses its size)...

any other ideas?
amitie is offline
Reply With Quote
View Public Profile
 
Old 01-20-2008, 07:28 PM Re: firefox text-align problem
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
Not unless we can see all the code - css and html.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to firefox text-align problem
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.15362 seconds with 12 queries