Reputation: 7425
I am having problems with a liquid layout and borders, causing elements to overflow.
The structure is somewhat like this:
<div id="container">
<label>Label</label><input type="text' />
</div>
#container{width: 100%;}
label{width: 25%;}
input{width: 75;}
I need the values to add up to 100% so the left and right edges align. Only the borders on the input make the input widths effectively width: 100% +2px;
Is there any way around this problem using just CSS?
Upvotes: 0
Views: 276
Reputation: 8869
Fixed:
http://jsfiddle.net/Mutant_Tractor/eRaB5/3/
Just add
margin: -1px;
to .input-text
class.
Upvotes: 1
Reputation: 105029
You can try by setting negative margins:
margin: -1px;
I've changed them on your jsFiddle and textboxes did jump right of label.
Upvotes: 2