I set a div’s width to 100% of the window. When I apply a border to this div, the right border is cut off. Do I have to perform a box model hack to this?
#textBoxContainer {
width:100%;
height:30%;
position:fixed;
z-index:99;
bottom:0px;
left:0px;
background-color:#999;
border: 4px solid #000;
}
<div id="textBoxContainer"></div>
The easiest fix in your case is this:
Live Demo
width: 100%.divfill the screen, instead addright: 0.It’s perfectly viable to give an element both a
leftand aright(or atopand abottom), like we’re doing here.