Float right in rtl css

2019-07-30 12:45发布

问题:

Now I have this set up in css

.one-half{
width: 305px;   
margin-right: 30px;
float: right;
} 
.feat-cat .last-col{
margin-right: 0;
}

.feat-cat{
overflow: hidden;
margin-bottom: 30px;
direction: rtl;
}

when i do this way

(.feat-cat .last-col) disappear as you can see
How do I do it correctly??

this is the site that i work on it http://hossamyehia.com/wordpress/

回答1:

For RTL layouts there are several properties you need to flip.

These include:

  • background
  • background-position
  • border
  • border-radius
  • clear
  • cursor
  • direction
  • float
  • left/right
  • margin
  • padding
  • text-align
  • text-indent

It's your margin-right which is causing the problems.

Change these to margin-left and it will work.