Log in

View Full Version : CSS layout - adding borders



Susie56
05-27-2011, 11:30 PM
1) CSS layout

2) http://www.theclementine.co.uk/neptune-css/neptune.css

3)When I enter a left border on the right hand column it shoots down under the left hand column. I have tried altering the widths by 1, 2 & even 4 pixels each way, but it still stays below the left hand column. When I take the 1 pixel left border out of the right hand column it is absolutely fine. But I would like that 1 pixel border down the left side of the right column. Can you help as to where I need to adjust the coding?

Many Thanks Susie:cool:

jscheuer1
05-28-2011, 07:23 AM
I can't be certain why, but something you tried isn't as I understood you to say. Either that or it's a browser issue. What browser are you testing in? I checked Firefox, Opera and IE.

Here's what I changed/added:


#rightcolumn{
float: left;
width: 199px; /*Width of right column*/
margin-left: -200px; /*Set left margin to -(RightColumnWidth)*/
background-color: #e3d4b0;
border-top: 1px solid #967e6c;
border-left: 1px solid #967e6c;
}

Works fine.

I think maybe you changed the margin. That does cause problems. But the width (if you include the width of the border) is still 200px.

Susie56
05-28-2011, 12:35 PM
Thank you so much :) you were right I did change the width of the column as well. Easy when you know how, silly me.

Thanks again, it is fine now.
Susie