"...Remember being a youngster, mom or dad telling you "close the door"? Well the same applies to HTML ...."

Go Back   Webmaster Forums > Code Forum > HTML Forum

Reply
 
Thread Tools Rate this Webmaster Discussion
Old 05-25-2004, 05:29 AM   #1
XR8TDN9GGA
New Member
 
Join Date: May 2004
Webmaster Discussions: 1
Rep Power: 39
XR8TDN9GGA is on a distinguished road
Need horizontal scroll in table (no vertical)

Hello
I need a horizontal scroll in a table (no vertical). Help!!!
Heres my code:


<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<div style="width: 300px; height: 100px; overflow: auto; border: 0; background-color: #FFFFFF;">
BLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAH
</div>

CHeers!!!!


XR8TDN9GGA is offline   Reply With Quote
Old 05-25-2004, 11:20 AM   #2
krak_d
Senior Member
 
krak_d's Avatar
 
Join Date: Mar 2004
Location: Liverpool
Webmaster Discussions: 166
Rep Power: 45
krak_d is just really nicekrak_d is just really nicekrak_d is just really nicekrak_d is just really nicekrak_d is just really nice
Hi,

change
Quote:
overflow: auto;
to, overflow-x: scroll; overflow-y: hidden;

krak_d
krak_d is offline   Reply With Quote
Old 05-25-2004, 04:41 PM   #3
stuboller
New Member
 
Join Date: May 2004
Webmaster Discussions: 1
Rep Power: 39
stuboller is on a distinguished road
more help please

Ok so I've got the following code:

<div style="width: 500px; height: 80px; overflow-x: auto; overflow-y: hidden;; background-color: #ffffc6">
<img src="photos/skorea_photos/07440009_thumb.png">
<img src="photos/skorea_photos/07440017_thumb.png">
<img src="photos/skorea_photos/07440037_thumb.png">
/div>
and the scroll bar still doesn't go horizontally when I add lots of images.

Is this someting to do with the images or am I missing something?

Thanks
in advance
stuboller is offline   Reply With Quote
Old 05-26-2004, 04:11 AM   #4
krak_d
Senior Member
 
krak_d's Avatar
 
Join Date: Mar 2004
Location: Liverpool
Webmaster Discussions: 166
Rep Power: 45
krak_d is just really nicekrak_d is just really nicekrak_d is just really nicekrak_d is just really nicekrak_d is just really nice
Hi,
alter the code in bold to read,

overflow-x: scroll; overflow-y: hidden;

Quote:
Originally Posted by stuboller
<div style="width: 500px; height: 80px; overflow-x: auto; overflow-y: hidden;; background-color: #ffffc6">
Also, you will need to align your images or they will stack one on top of the other!


krak_d

Last edited by krak_d; 05-26-2004 at 04:23 AM. Reason: forgot to mention img alignment!
krak_d is offline   Reply With Quote
Old 06-21-2004, 12:09 AM   #5
amitmathur
New Member
 
Join Date: Jun 2004
Webmaster Discussions: 1
Rep Power: 38
amitmathur is on a distinguished road
Question Still a Problem with Horizontal Scroll

Hi,

I also faced the similar problem. I tried the solution you suggested. It works fine with IE, but "overflow-x: scroll; overflow-y: hidden;" are not supported in Mozilla and Opera.

Is there any way around with this problem.

Regards,
Amit
amitmathur is offline   Reply With Quote
Old 01-25-2005, 10:44 AM   #6
beeper
New Member
 
Join Date: Jan 2005
Webmaster Discussions: 1
Rep Power: 35
beeper is on a distinguished road
It appears browsers such as firefox and opera et al do not correctly understand overflow x & y so you have to use auto. Then for IE you can add the x and y by using the *html hack as seen below (a bit late but there you go) This makes blue scrollers and a light blue background but its easy to change.

IN YOUR CSS
Code:
.scroll{
	height:100px;
	overflow:auto;
	margin:0; padding:5px; border:0;
	scrollbar-face-color: #6095C1;
	scrollbar-highlight-color: #C2D7E7;
	scrollbar-3dlight-color: #85AECF;
	scrollbar-darkshadow-color: #427AA8;
	scrollbar-shadow-color: #315B7D;
	scrollbar-arrow-color: #FFFFFF;
	scrollbar-track-color: #4DECF8S;
	text-align:justify;
	background-color: #E1F2FB;
}
* html .scroll{
	overflow-y: scroll; 
	overflow-x: hidden;
}
IN THE HTML
Code:
<div class="scroll">
   <p>Ullamco laboris nisi in reprehenderit in voluptate ut enim ad minim veniam. Velit esse cillum dolore qui officia deserunt consectetur adipisicing elit. Quis nostrud exercitation ut aliquip ex ea commodo consequat. Cupidatat non proident, mollit anim id est laborum. Lorem ipsum dolor sit amet, velit esse cillum dolore ut labore et dolore magna aliqua.</p>
<p>Ut aliquip ex ea commodo consequat. Qui officia deserunt quis nostrud exercitation sunt in culpa. Ut enim ad minim veniam, duis aute irure dolor quis nostrud exercitation.</p>
  </div>

Last edited by beeper; 01-25-2005 at 10:47 AM.
beeper is offline   Reply With Quote
Old 10-05-2009, 03:02 AM   #7
nmsmajeeth
New Member
 
Join Date: Oct 2009
Webmaster Discussions: 1
Rep Power: 6
nmsmajeeth is on a distinguished road
Re: Need horizontal scroll in table (no vertical)

Thanx
I tried a lot
ur code helps me to attach scrollbar in a table...
Thanx
nmsmajeeth is offline   Reply With Quote
Reply

Bookmarks

Tags
horizontal, scroll, table, vertical

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Webmaster Discussions
Thread Webmaster Discussion Starter Forum Replies Last Post
How can I change a vertical table (that reads info from CSV using SPAN) to horizontal aldar HTML Forum 1 07-30-2008 09:36 PM
Change table vertical to horizontal basketmen HTML Forum 1 04-17-2007 04:44 AM
Horizontal scroll bar fix suvarnashiva CSS Forum 0 11-21-2005 07:16 AM
I need a code for A vertical scroll bar without the horizontal scroll bar CursedBeauty HTML Forum 6 10-02-2004 03:51 AM
Vertical Scrollin with no Vertical Scroll Bar Raferdi Website Scripts Forum 1 08-27-2004 05:31 AM


All times are GMT -5. The time now is 09:12 PM.


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.