html - Why does Chrome add a pixel to my Div -


i have created 1010px long 5px border around making it's length 1020, however, when inspect div in chrome, despite fact code still says it's 1010px , it's border 5px it's 1021px

i can confirm neither left or right borders adding pixel div supposed house 5 separate images each 202px wide 5 should fit no gaps first image slightest of gaps between , left border

i have had work before tables, i'm redesigning site remove tables , replace them divs while maintaining exact same look

this code creates div

<div width="1010" align="center" style="border: 5px solid #9dbfff; margin:0px; padding:0px;"> 

note: yes move style .css file after got working here first, part of redesign, removing styles , putting them in .css files

you can try using "width" property in style attribute, this:

<div align="center" style="border: 5px solid #9dbfff; margin:0px; padding:0px; width:1010px;"> 

i inspected div in chrome , it's exact width specified in css.


Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -