Feb 28, 2011

Apply background without CSS background option

$('element').border( options );

JQUERY:
$('.test-1').border('5px');
$('.test-2').border('10px red .3');
$('.test-3').border('11px black .6');
$('.test-4').border('0 #fff000');

HTML/CSS:
<style type="text/css">
.test-1 {
width:400px;
background:#cccccc;
padding:20px;
margin:20px;
}
.test-2 {
position:absolute;
z-index:11;
top:115px;
left:450px;
width:100px;
height:100px;
background:#dddddd;
}
.test-3 {
position:relative;
top:100px;
left:400px;
width:200px;
height:50px;
background:#eeeeee;
}
.test-4 {
position:absolute;
z-index:20;
padding:20px;
top:10px;
left:410px;
}
</style>
<div class="test-1">
Some content<br />
Some content<br />
Some content
</div>
<div class="test-2">
...
</div>
<div class="test-3">
Over here.....
</div>
<div class="test-4">
no background color
</div>
<div style="height:110px;"></div>

No comments:

Post a Comment

Test post after a long time

i want to see the post