CSS border

meanster

Member
Joined
Nov 2, 2010
Messages
12
Reaction score
0
:confused:I want to add a border around the left and right column it must be round corners, so i have these corner images left_bot.gif, left_top.gif, right_bot.gif, right_top.gif and the border side.gif how to I use these images and make this border? Thought it be better to list the code I started with instead of what I ended with.

I Have this XHTML

<body>
<div id = "all">
<div id = "header">
<h1>Fixed Width Centered Layout</h1>
</div>

<div id = "left">
<h2>Left Column</h2>
<p>
Where Where Where Where Where Where Where Where Where Where Where Where
Where Where Where Where Where Where Where Where Where Where Where Where
Where Where Where Where Where Where Where Where Where Where Where Where
Where Where Where Where Where Where Where Where Where Where Where Where
</p>
</div>

<div id = "right">
<h2>Right Column</h2>
<p>
Where Where Where Where Where Where Where Where Where Where Where Where
Where Where Where Where Where Where Where Where Where Where Where Where
Where Where Where Where Where Where Where Where Where Where Where Where
Where Where Where Where Where Where Where Where Where Where Where Where
</p>

<p>
Where Where Where Where Where Where Where Where Where Where Where Where
Where Where Where Where Where Where Where Where Where Where Where Where
Where Where Where Where Where Where Where Where Where Where Where Where
Where Where Where Where Where Where Where Where Where Where Where Where
</p>

<p>
Where Where Where Where Where Where Where Where Where Where Where Where
Where Where Where Where Where Where Where Where Where Where Where Where
Where Where Where Where Where Where Where Where Where Where Where Where
Where Where Where Where Where Where Where Where Where Where Where Where
</p>
</div>

<div id = "footer">
<h3>Footer</h3>
</div>
</div>
</body>


and this CSS

#all {
background-image: url("fixedBG.gif");
background-repeat: repeat-y;
width: 640px;
height: 600px;
margin-left: auto;
margin-right: auto;
}

#header {
background-color: #e2e393;
border-bottom: 3px double black;
text-align: center;
float: left;
width: 640px;
clear: both;
}

#left {
float: left;
width: 200px;
clear: left;
}

#right {
float: left;
width: 440px;
}

#footer {
float: left;
width: 640px;
clear: both;
text-align: center;
background-color: #e2e393;
border-top: 3px double black;
}
 
You won't be able to do rounded borders on elements using images by just using CSS. You'll have to do a table-based layout to achieve that. If you want to use pure CSS for the rounded borders, it'll have to be CSS3, which has a native rounded borders property.
 
It doesn't have to be a tabled layout... Anyway, a few google searches should easily put you on the right path.
 
Top
Sign up to the MyBroadband newsletter
X