Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is default list styling (CSS)?

On my website I use reset.css. It adds exactly this to list styles:

ol, ul {     list-style: none outside none; } html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {     background: none repeat scroll 0 0 transparent;     border: 0 none;     font-size: 100%;     margin: 0;     outline: 0 none;     padding: 0;     vertical-align: baseline; } 

The problem is that all list styles are set to NONE with this. I want to revert back original list styles (default) for all lists on website sub-pages only (all lists in .my_container).

When I try settings things like list-style-type to inherit is doesn't inherit the browser's default styles just for this CSS property.

Is there any way to inherit the original browser's styles for certain properties without modifying reset.css?

like image 454
Atadj Avatar asked Jul 31 '12 09:07

Atadj


People also ask

What does list style do in CSS?

The CSS list-style property defines the appearance, position, and image for list item elements. It is a shorthand property for setting the list-style-type, list-style-position, and list-style-image CSS properties.

What is default CSS value?

The initial value of a CSS property is its default value, as listed in its definition table in the specification. The usage of the initial value depends on whether a property is inherited or not: For inherited properties, the initial value is used on the root element only, as long as no specified value is supplied.

What is the default style?

The default style is a group of settings that control the appearance of a chart item: Font. Entity or link type. Display options, such as which items properties are shown on the chart.


1 Answers

I used to set this CSS to remove the reset :

ul {     list-style-type: disc;     list-style-position: inside;  } ol {     list-style-type: decimal;     list-style-position: inside;  } ul ul, ol ul {     list-style-type: circle;     list-style-position: inside;     margin-left: 15px;  } ol ol, ul ol {     list-style-type: lower-latin;     list-style-position: inside;     margin-left: 15px;  } 

EDIT : with a specific class of course...

like image 194
zessx Avatar answered Sep 30 '22 15:09

zessx