Isaiah Bugarin
Isaiah Bugarin

Reputation: 493

How to size up border?

Is there a way to make the border bigger than the div that it's attached to? For example, if the div dimensions were 10x10, could I make the border 20x10?

Upvotes: 1

Views: 91

Answers (2)

Praveen Vijayan
Praveen Vijayan

Reputation: 6761

Yes you can:- check this link - http://jsfiddle.net/QnTqh/2/

div{
    width:100px;
    height:100px;
    border:1px solid red;
    border-width:200px 200px 10px 10px;
}​

Upvotes: 1

NightHawk
NightHawk

Reputation: 3681

You can use the following to control each side independently:

border-top: 10px solid #000;
border-right: 20px solid #000;
border-bottom: 10px solid #000;
border-left: 20px solid #000;

Or make them all the same:

border: 20px solid #000;

Upvotes: 1

Related Questions