Archive

Posts Tagged ‘Doctype’

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: , , , , , ,

Fixed Method for Positioning Elements in CSS

October 19th, 2009 Captain 4 comments

This article is short but inculding very useful information. A few years ago, we web programmers are used to make these operations via javascript. However, this wasn’t good method because, computers were not powerful enough. Nowadays, computers are too powerfull and we don’t need to use javascript anymore! Just one thing is required for us: CSS(Cascading Style Sheet).

Look at the top-right of this page. Did you see it? Let’s see how it is done…
Structure 1.0:

1
2
3
4
5
6
7
8
9
10
< !doctype html>
<head>
<style type="text/css">
#[DIV_ID]{
position:fixed;
top:[margin-top];
right:[margin-right];
left:[margin-left];
bottom:[margin-bottom];
}</style></head><body><div id="[DIV_ID]"></div></body>

Example 1.0: Assume that we have a div named Click to Read Complete Article »

Bookmark and Share
eXTReMe Tracker