Archive

Posts Tagged ‘Scrollbar’

Adding scrollbar to div via CSS

November 24th, 2009 Captain 1 comment

A few years ago, many web designers didn’t know this method. I think there are some designers which still doesn’t know this method. Therefore, i decided to write this short article.

Div elements have width and height properties and we set values of these properties as we want. However, our content can be bigger than the area that we divided sometimes. We have three choice:
1- Extending the area that we divided for div.
2- Adding a scrollbar to the div for overflowing content.
3- Hiding overflowing content.

We will talk about second choice…
Structure 1.0: If we want to add scrollbar to both of x and y Click to read complete article ->

Bookmark and Share
Categories: CSS, HTML Tags: , ,

Using DOCTYPE and Changing Style of Scrollbar with CSS

November 7th, 2009 Mehmatrix 2 comments

If you used DOCTYPE in your pages, you may be in trouble with changing scrollbar color and style. Web developers usually define scrollbar properties in body tag in CSS. However, if you used DOCTYPE this is not going to work. All you need to do, defining scrollbar style in HTML tag in CSS file, and… Yes, that’s all!

Wrong Usage: Style.css

1
2
3
4
5
6
7
8
9
10
11
12
13
14
body{
/*
Your other body style properties…

*/

scrollbar-base-color: #C1CBD7;
scrollbar-arrow-color: #9DACBF;
scrollbar-3dlight-color: #C1CBD7;
scrollbar-darkshadow-color: #C1CBD7;
scrollbar-face-color: #C1CBD7;
scrollbar-highlight-color: #C1CBD7;
scrollbar-shadow-color: #C1CBD7;
scrollbar-track-color: #FFFFFF;
}

Click to Read Complete Article »

Bookmark and Share
Categories: CSS, HTML Tags: , , , , , ,
eXTReMe Tracker