Scrollbar

About the template and stylesheet - and changing the menu
Post Reply
Dimitri
Posts: 1
Joined: Fri Jul 25, 2008 8:27 am

Scrollbar

Post by Dimitri » Fri Jul 25, 2008 8:29 am

Hi ,

I am busy at the website www.flexifin.nl . I want a scrollbar at the left ( So you can scroll the maintext on each page ) . How can you do that ? I have looked in the CSS file , but i can't figure it out.

Kind regards,

Dimitri

Connie
Posts: 282
Joined: Thu May 22, 2008 10:11 am
Location: Hamburg
Contact:

Re: Scrollbar

Post by Connie » Fri Jul 25, 2008 9:09 am

Scrollbars are usually at the right side (maybe on the left if you use right-to-left-writing-direction)

so if you want to define a scrollbar-position with CSS (if that is possible) I am sure it will not be supported by all browsers and you will run into trouble possibly

left scrollbars are mostly caused by frames or iframes....
|---
Connie Müller-Gödecke, http://www.webdeerns.de

ZiPs
Posts: 633
Joined: Thu May 22, 2008 6:17 pm
Location: Faxe, Denmark
Contact:

Re: Scrollbar

Post by ZiPs » Fri Jul 25, 2008 1:36 pm

Here is an example of scrollbar left

But as Connie writes, not all browser it will work in.

Here is a link to the receiving scrollbar on the left side W3

Set this into all your pages you want left scroll on, this before you text

Code: Select all

<div style="vertical-align:top;width:100%;height:300px;" dir="rtl">
<div style="height:100%;overflow:auto;text-align:left;padding-left:10px;">
And this after you text

Code: Select all

</div></div>
This can not be changed in your templates since it also will turn your editor around.

It works with DTD HTML 4.01

/ZiPs
Preben Dahl | Webmaster cmsimple.dk | Projekt-og domæne ejer Gert Ebersbach

mads
Posts: 22
Joined: Wed Jun 04, 2008 11:47 pm
Location: Århus Denmark
Contact:

Re: Scrollbar

Post by mads » Thu Aug 28, 2008 2:37 am

Hi,

Can you anyone help me how to do it (making a scrollbar for the content, within the layout) on this one:
(clone of 'madeinchina-template): www.galleri269.dk
I have made an hidden page where the problem is very clear: www.galleri269.dk/index.php?Galleri_269:Scrollproblem

It's done with CSS, and I need help to define it there...
I tried your code above, but it messed up the layout of the whole page :-(

Hope you have an idea,

:-) Mads

Till
Posts: 337
Joined: Tue May 20, 2008 7:20 am
Location: Germany: Bremen
Contact:

Re: Scrollbar

Post by Till » Thu Aug 28, 2008 1:47 pm

mads wrote:Hope you have an idea
#contsect {
width: 760px;
float: left;
padding: 10px;
height: 450px;
overflow:auto;
}

???

Till

mads
Posts: 22
Joined: Wed Jun 04, 2008 11:47 pm
Location: Århus Denmark
Contact:

Re: Scrollbar

Post by mads » Fri Aug 29, 2008 7:44 pm

Hi
Till wrote:height: 450px;
overflow:auto;
I can see that the above code is "where the fun is", and I added it the the stylesheet.css
And it works! Great! Just what I was looking for :-)

But (is'nt it always so?):
* Can I change the position where the scrollbar starts in the top?
Now its aligbed with the top of the Content area.
Fine, but can i set a margin/padding/offset? Or?

You kan take a look, I have already implemented it the website.

.. and thanks a lot for the very helpful hint!

:-) Mads

Till
Posts: 337
Joined: Tue May 20, 2008 7:20 am
Location: Germany: Bremen
Contact:

Re: Scrollbar

Post by Till » Fri Aug 29, 2008 8:27 pm

Probably the easiest way to go is to add a div container above and another one below your content and fill it with life. A more elegant way would be to do something with your "#pagebas" container, which is not used yet by CSS. You could add margins or padding to the top and bottom to extend the room. However, there is a problem with this container. Since there are "floats" used in it, it shrinks to a horizontal string, which is not usable for firefox (a bug they seem to be unable to fix). You have to "clearfix" this container. Then you can use it like normal. Google for "clearfix" in combination with "css".

Till

Post Reply