inline css style width not able to override computed css style's width value
I'm seeing a strange behaviour which i'm not able to figure out.
The webpage that i'm working on has a lot of css styles. So for one of my div's i'm using inline css to make the width as per my requirement (which shows up in the 开发者_开发知识库source code just fine). But when i'm inspecting the element in Google Chrome i see that the computed width as slightly less than my value. How do i override the computed value.
Thanks
Try with !important to override any value.
#div {width:500px !important;}
Could you please provide more sample code. This is not enough information to answer the question properly. As stated by miduga, !important
should be enough to override that style.
Are you certain that this element is of the correct display type? Remember that you can't define a width for inline elements.
精彩评论