Qcom
Qcom

Reputation: 19163

Fixing CSS border-right and border-left issues

For some reason, when I implement the border-left: 10px solid #FF0000 css style for my left column, and the border-right: 10px solid #FF0000 for my right column, for some reason, it throws everything off...

Anyone know why?

Upvotes: 0

Views: 409

Answers (3)

Dustin Laine
Dustin Laine

Reputation: 38503

Probably because the border is added to the width of you element. For example if you have a 100px div with a 10px border that will make your element 120px total.

Upvotes: 1

Dejan Marjanović
Dejan Marjanović

Reputation: 19380

Subtract 20px from elements width.

Upvotes: 4

Ray
Ray

Reputation: 21905

"throws everything off" is a little vague, but here is a stab at it. Have you specified a width for the container of your bordered content? Maybe your 10px borders cause your content to be too wide.

If this isn't the problem, please post some more specific info.

Upvotes: 1

Related Questions