9

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

Gimmy
  • 3,781
  • 2
  • 18
  • 27
Vanessa
  • 99
  • 1
  • 2
  • 1
    What are you trying to accomplish? It seems like the site you are linking covers pretty much every combination. – kba Jan 19 '12 at 01:24
  • ...yes, it seems to me that overflow:auto should just work for you; in the case where the width of the element is greater than the content why do you want a scrollbar to be visible? Can you outline the problem more? – Chris Bentley Jan 19 '12 at 01:43
  • I'm trying to accomplish the CSS code I posted in my question. I have .content div of 500*500 pixels, and I need to have an overflow-y inside it, and .player div that is inside the .content div but I need .player to show at a margin-left of -200 pixels with .content div and positioned as an absolute element. Problem: if I put "overflow-y: auto" in .content (to let visitors scroll down in the .content div), the .player div doesn't show, it's hidden (for reasons enunciated in the link I shared). Note that the .player div must absolutely be inside the .content div for loop PHP reasons... – Vanessa Jan 19 '12 at 04:21
  • 2
    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 05:38
  • 2
    @Vanessa Can you please answer your own question in the "Your Answer" textarea. – hitautodestruct May 28 '13 at 10:23

1 Answers1

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 ! "

Community
  • 1
  • 1
Carol McKay
  • 2,438
  • 1
  • 15
  • 15