#border{
background-image:url(IMAGE.gif);
padding:8px;
width:296px;
height:200px;
}
#content{
width:100%;
height:100%;
background-color: #fff8dc;
}
<DIV id="border">
<DIV id="content">
</DIV>
</DIV>
Article four of a series by Jim Stiles.
Setting Border Properties:
Text Borders
The below example is a demonstration for setting outlining borders for text using style sheet attributes.
.over{border:2px dotted red;width:320px;height:20px}
.out{border:0px;width:320px;height:23px;padding-left:2px;padding-top:2px}
Table Borders
The below example is a demonstration for setting outlining borders for tables using style sheet attributes.|
#border{
background-image:url(IMAGE.gif); padding:8px; width:296px; height:200px; } #content{ width:100%; height:100%; background-color: #fff8dc; } <DIV id="border"> <DIV id="content"> </DIV> </DIV> |
I. The parent div is given the following:
|
III. Additional Notes:
In order to get an even border, you need to ensure the dimensions are correct for the size of the image used. The width of the border div must divide equally with the image width and the height of the border div must divide equally with the image height. Therefore if the image width is 10 pixels then the border width must be in multiples of 10.Next, I will go over some compatability issues and how to fix them.
<<< Previous | HOME | Next >>>