Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   HTML (http://www.velocityreviews.com/forums/f31-html.html)
-   -   forcing horizontal div scrolling (http://www.velocityreviews.com/forums/t161868-forcing-horizontal-div-scrolling.html)

King of Red Lions 05-26-2005 09:21 AM

forcing horizontal div scrolling
 
Hi, i have a blog and every new post appears in a <td> within a table.
This table is contained within a <div> and I was wondering if there was
anyway of forcing the <div> to scroll side horizontaly! This would help
as my blog displays the 8 newest posts. Many thanks in advance!

Richard Quick 05-26-2005 09:52 AM

Re: forcing horizontal div scrolling
 
"King of Red Lions" <thaynes/no_spam/@gawab.com> wrote in message
news:d744em$d1k$1@news8.svr.pol.co.uk...
> Hi, i have a blog and every new post appears in a <td> within a table.
> This table is contained within a <div> and I was wondering if there was
> anyway of forcing the <div> to scroll side horizontaly! This would help
> as my blog displays the 8 newest posts. Many thanks in advance!


You can us CSS to achieve (more or less) what you are after.

First you need to give your div a class

<div class="scroller"><table> ........ </table></div>

Then in the head have the following code:

<style type="text/css"><!--

div.scroller {
height: 75px;
width: 200px;
overflow: auto;
}

div.scroller table {
height: 55px;
margin: 0;
}

//--></style>


The dimensions of the div will be fixed at 75x200px. If the table is larger
than that the div will sroll in which ever direction it needs to.

If the table (plus scroll bar) is less high than the div, but wider then it
will scroll horizontally.

I've made the height of the table small enough to allow for the scroll bar.

Hope this helps.

--
Richard Quick
http://www.chocolatemagazine.co.uk



Leonard Blaisdell 05-27-2005 02:27 AM

Re: forcing horizontal div scrolling
 
In article <d744em$d1k$1@news8.svr.pol.co.uk>,
King of Red Lions <thaynes/no_spam/@gawab.com> wrote:

> Hi, i have a blog and every new post appears in a <td> within a table.
> This table is contained within a <div> and I was wondering if there was
> anyway of forcing the <div> to scroll side horizontaly! This would help
> as my blog displays the 8 newest posts. Many thanks in advance!


I was always taught that horizontal scrolling == 'bad'. I believed it
when I surfed the net at 640x480 until a couple of months ago. Now I
think that tables == 'bad' with my much higher resolution and most
tables fixed to a resolution much smaller. Can't you dump the table
layout and go for any-size-design? I realize that most Perl and PHP
books love to show you how to dump vars in a table cell. But it doesn't
need to be that way.

leo

--
<http://web0.greatbasin.net/~leo/


All times are GMT. The time now is 10:50 PM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57