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
|
|
Css Padding With Rtl Direction In Firefox
This is a discussion on Css Padding With Rtl Direction In Firefox, within the CSS section. This forum and the thread "Css Padding With Rtl Direction In Firefox" are both part of the Designing Your Website category.
![]() ![]() |
Feb 14 2008, 05:39 PM
Post
#1
|
|
![]() Fresh Squeezed ![]() ![]() Group: Members Posts: 14 Joined: 13-February 08 From: Tehran - Iran Member No.: 15 |
Hi
Please help me with this : I have created a blog with wordpress, i have created a navigation menu with list items, if you see the screenshots you will see that in IE and OPERA it looks ok, but in FF it doesn't ! The problem is that the texts are in persian language which i use rtl direction in css, but FF is acting strange with this ! it adds all the paddings to the right side of the menu ! these are css codes for navigation : CODE #nav { background-image: url(images/menubg.jpg); width:741px; height:30px; background-repeat:no-repeat; margin:10px auto; padding:12px 0; } ul#nav-links li { direction:rtl; display:inline; list-style:none; font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; font-size:18px; padding-left:110px; } Is this firefox bug ? or am i doing something wrong ?!
Attached File(s)
-------------------- |
|
|
Feb 14 2008, 05:44 PM
Post
#2
|
|
![]() Squeeze Machine ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 573 Joined: 13-February 08 From: Scotland, UK Member No.: 4 |
This is just a hit or a miss but have you tried margin instead of padding? I have never used the direction attribute.
-------------------- Thanks,
Marc |
|
|
Feb 14 2008, 05:49 PM
Post
#3
|
|
![]() Fresh Squeezed ![]() ![]() Group: Members Posts: 14 Joined: 13-February 08 From: Tehran - Iran Member No.: 15 |
yes, tried, but dont know why firefox act like this !!!
IE and Opera render it correctly !! -------------------- |
|
|
Feb 14 2008, 06:54 PM
Post
#4
|
|
![]() Squeezing ![]() ![]() ![]() Group: Members Posts: 70 Joined: 14-February 08 From: Las Vegas, NV Member No.: 122 |
yes, tried, but dont know why firefox act like this !!! IE and Opera render it correctly !! maybe try using percentages for the width of the <li>'s instead of using the fixed padding? -------------------- |
|
|
Feb 14 2008, 07:01 PM
Post
#5
|
|
![]() Fresh Squeezed ![]() ![]() Group: Members Posts: 14 Joined: 13-February 08 From: Tehran - Iran Member No.: 15 |
I have tried all ways !
Firefox will add the whole padding to one element !!! -------------------- |
|
|
Feb 14 2008, 07:09 PM
Post
#6
|
|
![]() Squeezing ![]() ![]() ![]() Group: Members Posts: 70 Joined: 14-February 08 From: Las Vegas, NV Member No.: 122 |
I have tried all ways ! Firefox will add the whole padding to one element !!! well what I mean is make the ul 100% of the #nav div and then for each <li> use width:25%; instead of the padding: 110px and then just add text-align: center. -------------------- |
|
|
Feb 14 2008, 07:12 PM
Post
#7
|
|
![]() Co-Founder ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Co-Founders Posts: 2,761 Joined: 13-February 08 From: Pink House in USA Member No.: 3 |
well what I mean is make the ul 100% of the #nav div and then for each <li> use width:25%; instead of the padding: 110px and then just add text-align: center. Marsoul, is this the entire code for the navigaton? Do you have the <ul></ul> bits? If there is more code, please post it up and I'll see if I can figure it out. -------------------- |
|
|
Feb 14 2008, 07:21 PM
Post
#8
|
|
![]() Fresh Squeezed ![]() ![]() Group: Members Posts: 14 Joined: 13-February 08 From: Tehran - Iran Member No.: 15 |
here is the whole code for navigation :
CODE #nav { background-image: url(images/menubg.jpg); width:741px; height:30px; background-repeat:no-repeat; margin:10px auto; padding:12px 0; } ul#nav-links li { list-style:none; font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; font-size:18px; display:inline; padding: 0 0 0 110px; } #nav-links li a { color:#174974; text-decoration:none; } #nav-links li a:hover { color:#FFFFFF; text-decoration:none; } the problem is with direction:rtl, firefox cant render it correctly, other browsers render it right, even IE6 ! here is the link to my site : http://blog.datisdesign.com/persian -------------------- |
|
|
Feb 14 2008, 08:23 PM
Post
#9
|
|
![]() Squeezing ![]() ![]() ![]() Group: Members Posts: 75 Joined: 14-February 08 Member No.: 86 |
You can replace the display inline with a float: right and move the padding to the other side.
CODE ul#nav-links li list-style:none; font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; font-size:18px; float:right; padding:0pt 110px 0pt 0px;} That displays correctly in firefox. I did not check out what that does in IE6 though. |
|
|
Feb 14 2008, 08:32 PM
Post
#10
|
|
![]() Fresh Squeezed ![]() ![]() Group: Members Posts: 14 Joined: 13-February 08 From: Tehran - Iran Member No.: 15 |
Many Many Thanks !
It worked ! -------------------- |
|
|
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 | |||
|---|---|---|---|---|---|---|---|
![]() |
8 | Bridges | 276 | 20th February 2008 - 06:45 PM Last post by: Daygon |
|||
![]() |
20 | Scott-S | 864 | 5th July 2008 - 02:56 PM Last post by: thewal |
|||
![]() |
10 | kela | 365 | 16th April 2008 - 07:27 AM Last post by: Craigboy87 |
|||
![]() |
3 | Jason | 169 | 14th April 2008 - 01:38 PM Last post by: c010depunkk |
|||
![]() |
6 | Linda | 130 | 2nd May 2008 - 10:21 AM Last post by: Linda |
|||






Feb 14 2008, 05:39 PM














