Overflow-y: auto and overflow-x: visible in the same time? [duplicate]

青春壹個敷衍的年華 提交于 2019-12-30 18:28:34

问题


I'd like to put this properties for a div:

.content {
position: relative;
overflow-y : auto;
overflow-x: visible;
}

According to this page, if one is specified as 'visible' and the other is 'scroll' or 'auto', then 'visible' is set to 'auto'. So it's seem to be impossible to use simultaneously an overflow-y:auto and an overflow-x:visible.

However, I need to put this properties for a website, is there a way to do it ?

Vanessa found the answer by her own. Here it is:

OK, I fixed the problem :) If anyone has this kind of problems : don't forget to remove the relative position of the parent element (this which have the overflow property) : the absolutive div will be placed according the parent div which have the relative position. If not, it will be placed according to body ! – Vanessa Jan 19 '12 at 5:38


回答1:


Vanessa https://stackoverflow.com/users/1151236/vanessa says "OK, I fixed the problem :) If anyone has this kind of problems : don't forget to remove the relative position of the parent element (this which have the overflow property) : the absolutive div will be placed according the parent div which have the relative position. If not, it will be placed according to body ! "



来源:https://stackoverflow.com/questions/8919903/overflow-y-auto-and-overflow-x-visible-in-the-same-time

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