I am creating a div in Chrome, like this:
<div style="position:absolute;background:#000;width:150px;height:150px"></div>
When i inspect this element in Chrome it is listed as:
<div style="position: absolute; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(0, 0, 0); width: 150px; height: 150px; background-position: initial initial; background-repeat: initial initial; "></div>
Is there any way to avoid this re-format that the browser applies or is it unavoidable?
You might wonder why i need to keep it as i initially created it.
I need it this way because my program is about a WYSIWYG HTML editor, and i would like the output to be as readable as possible when viewed in the output HTML.
Thanks in advance
Try explicitly specifying background-color:#000 instead of the generic background: