shad Posted February 1, 2012 Report Share Posted February 1, 2012 /* CSS Document */*{line-height:12px; font-family:Arial, Helvetica, sans-serif; font-size:12px;}body {margin:0;}ul, li, p, span, div, h1, h2, h3, h4, h5, h6, form, input {margin:0; padding:0;} I downloaded a css template from internet the first line of css starts with ' * ' and some properties as shown below what does this mean? *{line-height:12px; font-family:Arial, Helvetica, sans-serif; font-size:12px;} Link to comment Share on other sites More sharing options...
Ingolme Posted February 1, 2012 Report Share Posted February 1, 2012 The asterisk selects every element in the document. 2 Link to comment Share on other sites More sharing options...
eTianbun Posted February 1, 2012 Report Share Posted February 1, 2012 (edited) e.g: *{padding:0px} This willAssign padding:0px to all elements in the document.The Asterisk, is normaly used to reset all element's margin and padding to: 0px. Elements (e.g: <h1>) that already have default value of padding/margin, ll be reset to zero pixel (0px). Edited February 1, 2012 by eTianbun 1 Link to comment Share on other sites More sharing options...
thescientist Posted February 1, 2012 Report Share Posted February 1, 2012 it is referred to as the universal selector, for the reasons explained in the above posts. 1 Link to comment Share on other sites More sharing options...
dink Posted February 4, 2012 Report Share Posted February 4, 2012 Thanks for sharing that info... I have been writing css for some time and did not know that...Learn something new every day and life is fun.dink Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now