Hi,
I want to remove the dots from an unordered list the only way I found is using css property list-style-type: none;
but this remove any other style that I specify
Any help.
if there are nothing in your html elements, effectively it takes 0 width and 0 height. So technically styles are getting applied but there is no content to show you styles.
Your question was already answered, with no content the element has 0 hight. But here is a bit more info.
The list-styles (bullets etc.) counts as generated content. It is (AFAIK) the generated marker box that gives the li its height even when it has no other content inside it (when list-styles is set to something other than none). The default style given is user agent defined.
An element with ‘display: list-item’ generates a principal block box for the element’s content and, depending on the values of ‘list-style-type’ and ‘list-style-image’, possibly also a marker box as a visual indication that the element is a list item.
The list-item keyword causes the element to generate a ::marker pseudo-element [CSS-PSEUDO-4] with the content specified by its list-style properties (CSS 2.1§12.5 Lists) [CSS2] together with a principal box of the specified type for its own contents.