Set CSS width to 100% + right border is missing? -


i set div's width 100% of window. when apply border div, right border cut off. have perform box model hack 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 case this:

#textboxcontainer {     height: 30%;     position: fixed;     z-index: 99;     bottom: 0;     left: 0;     right: 0;     background-color: #999;     border: 4px solid #000; } 

live demo

  • remove width: 100%.
  • to make div fill screen, instead add right: 0.

it's viable give element both left , right (or top , bottom), we're doing here.


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -