purpose of period in front of CSS attribute

jagku used Ask the Experts™
Hello Experts,

I have seen the following within html:

<ul style=".margin-left: -10px;">

I understand the purpose of a period in front of class names.
However, what is the significance of the above (ie the difference between the above and style="margin-left: -10px;"

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2011
There should NEVER be a period in front of the CSS properties like that.  Having a period in front of a class name is perfectly acceptable, however that code won't(shouldn't) even work.

Try this code here:
LZ1 makes a good point, it looks like a mistake, honestly. should be:

<ul style="margin-left: -10px;">

Open in new window


<ul class=".margin-left">

Open in new window

where the class is defined in your style sheet.
(which i wouldn't advise giving a class the same name as a rule)

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial