Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

horizontal scrolling div not working in Safari

Hi I made this site a while ago in my table days but have just realised the horizontal scrolling dive doesn't work in Safari.

#galleryscroller {
    overflow-x:scroll ;
    overflow-y:hidden;
    overflow:-moz-scrollbars-horizontal !important;
    height:138px; 
    width:360px;
}

<div id="galleryscroller">
<table width="100%"  border="0" cellspacing="0" cellpadding="6">
<tr align="left" valign="middle">
<td><a onclick="return showPic(this)" href="blahblah.jpg"><img src="blahblah.jpg" alt="Events" width="76" height="100" border="0" /></a></td>
<td><a onclick="return showPic(this)" href="blahblah.jpg"><img src="blahblah.jpg" alt="Events" width="100" height="67" border="0" /></a></td>
</tr>
</table>
</div>

The site is here - www.tobymurphy.com

Can anyone help?, so far no answers on Google have worked...

like image 713
morktron Avatar asked Oct 30 '25 05:10

morktron


1 Answers

There's a quirk with the WebKit engine with scrolling when you need to hide one of the scrollbars. Try the following:

#galleryscroller {
  overflow: none;
  overflow-x: auto;
  display: block;
  height: 138px;
  width: 360px;
}

Note the first reset to make overflow to none.

like image 195
ferdley Avatar answered Oct 31 '25 19:10

ferdley



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!