rulururu

post How to stretch sidebar(div) vertically (whole height of site) ?

June 9th, 2010

Filed under: CSS,Tip — Alex Bylim @ 5:22 pm

Hey dudes, I know there are a lot of different approaches make two-columns layout, and to make sidebar stretch vertically. But always there is one problem: side bar should fill vertical side area 1) when content longer then sidebar 2) when content shorter then sidebar. So here is how to solve this with CSS:

/* this will allow sidebar stretch vertically in right way */
html, body {
	min-height:100%;
	position: absolute; 
        width:100%;
}
 
/* stretching our sidebar */
#sidebar{
 width: 300px;
 height: auto;
 min-height:100%;
 position:absolute;
 background-color: #555;
}

To make content block is not to hard and you need is to set margin-left the same width as sidebar width

post CSS3 box-shadow property?

April 5th, 2010

Filed under: CSS,Tip — Alex Bylim @ 9:03 pm

Hi. You probably know that there is property box-shadow in the CSS3, and many modern browsers day by day supports more CSS3 features. Few days ago I used text-shadow, pretty cool, I like it. Then I wanted to try box-shadow and… it did not work for me, I thought browsers does not support it yet. I was misstaken, to make it works in popular browsers you can use properties: -moz-box-shadow,  -webkit-box-shadow, box-shadow.  More details you can find on the internet, you even can find how to make it under IE.

ruldrurd
Powered by WordPress, Web Design by Laurentiu Piron
Entries (RSS) and Comments (RSS)