I have a div which has fixed width in px. but when I apply background color ( yellow ) on div its not covering whole div background. there still some 1px space is getting left blank.
enter image description here
enter image description here
any kind of suggestion appreciated.
i want the background-color to apply on whole div container.
2
Answers
try to change the display of the outer contaier
the problem is probably not from the div but from the container that the div is
I dont know where is this "unchanged" 1px space is, top,bottom, left right.
Usually to set background to
div
element this should work:You can use HEX color code like:
#ffff00
If you have some 1px space left (at one of the sides), maybe you have a
1px
border definedwhich has different color in
div
element or parent element: