"span.webdeveloper-div-order {" Whats this?

M

Mike Barnard

Hi again.

Yes, I've googled. Found the phrase sparingly but no explanation. So,
whats it for please? It's the first line in a css file I'm looking
at. It has loads of colours like this in the statement.

background-color: #ffff99 !important;

Just trying to learn as best I can.

Thanks.
 
S

Steve Pugh

Mike Barnard said:
Yes, I've googled. Found the phrase sparingly but no explanation. So,
whats it for please? It's the first line in a css file I'm looking
at.

span.webdeveloper-div-order is a CSS selector.
span is a selector for the span HTML element and the dot denotes a
class, in this case that selector selects all span elements of the
class webdeveloper-div-order. i.e. it matches the HTML <span
class="span.webdeveloper-div-order">... said:
It has loads of colours like this in the statement.

background-color: #ffff99 !important;

And those are the styles.

CSS rules take the form
selector { property: value;}

In thise it's setting the background-color property for the above
mentioned HTML elements. The !important is an instruction that raises
declaration above the normal specificity order and is used to avoid
clashes with declarations from elsewhere in the cascade.

CSS: http://www.w3.org/Style/CSS/

Steve
 
M

Mike Barnard

span.webdeveloper-div-order is a CSS selector.
span is a selector for the span HTML element and the dot denotes a
class, in this case that selector selects all span elements of the
class webdeveloper-div-order. i.e. it matches the HTML <span


And those are the styles.

CSS rules take the form
selector { property: value;}

In thise it's setting the background-color property for the above
mentioned HTML elements. The !important is an instruction that raises
declaration above the normal specificity order and is used to avoid
clashes with declarations from elsewhere in the cascade.

CSS: http://www.w3.org/Style/CSS/

Steve

I see. Thanks for the in depth breakdown. I have a LOOOOOTTT to
learn yet, if ever.
 
S

Steve Pugh

Toby A Inkster said:
or even:

<span class="webdeveloper-div-order">...</span>

;-)

That plus the terrible typing in all of yesterday's posts confirms
that hangovers and usenet should never mix.

Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,281
Latest member
Pedroaciny

Latest Threads

Top