Your Ad Here

Basic css style syntax troubleshooting


Selectors
■ Check spelling.
■ If grouped, make sure you have commas between selectors. Make sure
there is no comma between the selector list and the opening curly bracket,
and that you don’t accidentally use double commas.
■ If combinators, check that your combinator syntax is correct.
Properties
■ Check spelling.
■ Check that you are using the correct property name.
■ Check that you are using the correct format and order (such as
with shorthand properties).
■ If multiple, make sure you have semicolons between the
property:value declarations to separate them.

Values
■ Check spelling.
■ Check that you are using the correct unit of measure for the value.
■ Check that the value is an acceptable value for the property.
■ Where applicable, make sure the value is properly enclosed by quote marks.
Declaration block
■ Make sure your declaration block is enclosed with curly brackets (not square
or angle brackets).
■ Make sure your whole style declaration ends with a semicolon (which, with
the end curly bracket, essentially delimits the end of the declaration).
In the markup
■ If you are linking to an external style sheet using the <link> tag, make sure
you have rel="stylesheet".
■ If you are embedding styles, make sure you have a closing </style> tag.


Typical Tip-off s
How can you know what the culprits of your problems are? Here are some
outcomes to look for:
Outcome/Problem Possible Culprits
The style doesn’t show up at all on
the page
• a nonexistent or misspelled selector
• a missing opening or closing curly bracket
• rel=”stylesheet” missing from the <link> tag
• incorrect URL to the style sheet in the <link> tag
The styles lower in the style sheet
don’t show up on the page.
The previous style declaration wasn’t properly
closed with a semicolon or an end bracket.
The style shows up, but is applied
to the wrong element.
Your combinator selector probably has improper
structure and is targeting the wrong element.
These guidelines are just the beginning. As we start to review the tools of the
trade, you will learn some time-honored techniques for writing better and
more efficient CSS code, as well as some intermediate troubleshooting tips.
From the





Meaningfull Website headers

Organize Data with tables

Removing Extraneous Information

Writing Effective Paragraphs

Making site title to clarify its purpose

Managing External Links

Iconography and Language Use

Site-Wide Standards

Creating User Pathways

Developing Prototypes

Understanding Wireframing

Auditing content

Organic Growth and the Web




0 comments:

Post a Comment

Popular Posts

Recent posts