Float right in rtl css

[亡魂溺海] 提交于 2020-01-04 15:28:50

问题


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, but are not limited to:

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



来源:https://stackoverflow.com/questions/16017098/float-right-in-rtl-css

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!