The Web Squeeze: Css Padding With Rtl Direction In Firefox - The Web Squeeze

Jump to content

Forum

Cascading Style Sheets (CSS)

Cascading Style Sheets makes your website go from bland to SWEET! Learn CSS or teach CSS in this forum. Learn CSS Shorthand, how to use floats correctly, and how to style 2 and 3 column websites.
Digg Del.ico.us Slashdot Technorati furl Reddit Facebook Fark Google Magnolia Wink Yahoo Netscape
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Css Padding With Rtl Direction In Firefox

#1 User is offline   marSoul Icon

  • Fresh Squeezed
  • PipPip
  • Group: Members
  • Posts: 28
  • Joined: 13-February 08
  • Gender:Male
  • Location:Tehran - Iran

  Posted 14 February 2008 - 05:39 PM

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 :

#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)

  • Attached File  FF.jpg (43.18K)
    Number of downloads: 29
  • Attached File  IE_OPERA.jpg (38.55K)
    Number of downloads: 21

Designing for Communicating

Datis Design Website

0

#2 User is offline   Marc Icon

  • Squeeze Machine
  • PipPipPipPipPip
  • Group: Members
  • Posts: 790
  • Joined: 13-February 08
  • Gender:Male
  • Location:Scotland, UK

Posted 14 February 2008 - 05:44 PM

This is just a hit or a miss but have you tried margin instead of padding? I have never used the direction attribute.
0

#3 User is offline   marSoul Icon

  • Fresh Squeezed
  • PipPip
  • Group: Members
  • Posts: 28
  • Joined: 13-February 08
  • Gender:Male
  • Location:Tehran - Iran

Posted 14 February 2008 - 05:49 PM

yes, tried, but dont know why firefox act like this !!!
IE and Opera render it correctly !!
Designing for Communicating

Datis Design Website

0

#4 User is offline   overthemike Icon

  • Rapid Squeezer
  • PipPipPipPip
  • Group: Members
  • Posts: 341
  • Joined: 14-February 08
  • Gender:Male
  • Location:Las Vegas, NV

Posted 14 February 2008 - 06:54 PM

View PostmarSoul, on Feb 14 2008, 02:49 PM, said:

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?
A Life? Cool! Where can I download one of those?
http://www.overthemike.com
0

#5 User is offline   marSoul Icon

  • Fresh Squeezed
  • PipPip
  • Group: Members
  • Posts: 28
  • Joined: 13-February 08
  • Gender:Male
  • Location:Tehran - Iran

Posted 14 February 2008 - 07:01 PM

I have tried all ways !
Firefox will add the whole padding to one element !!!
Designing for Communicating

Datis Design Website

0

#6 User is offline   overthemike Icon

  • Rapid Squeezer
  • PipPipPipPip
  • Group: Members
  • Posts: 341
  • Joined: 14-February 08
  • Gender:Male
  • Location:Las Vegas, NV

Posted 14 February 2008 - 07:09 PM

View PostmarSoul, on Feb 14 2008, 04:01 PM, said:

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.
A Life? Cool! Where can I download one of those?
http://www.overthemike.com
0

#7 User is offline   Linda Icon

  • Chief Operations Officer
  • Icon
  • Group: Founders
  • Posts: 6,400
  • Joined: 13-February 08
  • Gender:Female
  • Location:Pink House in USA

Posted 14 February 2008 - 07:12 PM

View Postpaintingtheweb, on Feb 14 2008, 07:09 PM, said:

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.

#8 User is offline   marSoul Icon

  • Fresh Squeezed
  • PipPip
  • Group: Members
  • Posts: 28
  • Joined: 13-February 08
  • Gender:Male
  • Location:Tehran - Iran

Posted 14 February 2008 - 07:21 PM

here is the whole code for navigation :

#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
Designing for Communicating

Datis Design Website

0

#9 User is offline   ejg Icon

  • Squeezing
  • PipPipPip
  • Group: Members
  • Posts: 79
  • Joined: 14-February 08

Posted 14 February 2008 - 08:23 PM

You can replace the display inline with a float: right and move the padding to the other side.

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.
0

#10 User is offline   marSoul Icon

  • Fresh Squeezed
  • PipPip
  • Group: Members
  • Posts: 28
  • Joined: 13-February 08
  • Gender:Male
  • Location:Tehran - Iran

Posted 14 February 2008 - 08:32 PM

Many Many Thanks !
It worked ! :dance4: :dance4:
Designing for Communicating

Datis Design Website

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic


Page 1 of 1
Trackbacks
Trackback URL Trackback Date Total Hits
No trackbacks were found
Page 1 of 1

Similar Topics
  Topic Started By Stats Last Post Info
New Replies Icon Firefox Bridges Icon
  • 8 Replies
  • 1,605 Views
Hot Topic (New) Icon Useful Firefox Add-ons Scott-S Icon
  • 20 Replies
  • 5,061 Views
New Replies Icon Difference Between Ie And Firefox kela Icon
  • 10 Replies
  • 2,082 Views
New Replies Icon Firefox - Autocomplete Jason Icon
  • 3 Replies
  • 1,227 Views
New Replies Icon Firefox Ad-on Linda Icon
  • 6 Replies
  • 1,217 Views

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users