As we discuss examples of certain code in your CSS, I want to reference a website that focuses  on the reason and circumstances a seaman should seek out maritime injury lawyers. This is a lead generating site with pertinent  information for maritime workers who have been seriously injured aboard a US flagged ship. You can be sure there will be lots of lawyers protecting the interests of the vessel where the accident occurred. You too should be well represented. Admiralty law is a federally recognized body of laws that formalizes the long-standing maritime maintenance and cure traditions, which have been recognized for centuries. The rules governing who qualifies as a Jones Act seaman, as well as what types of  vessels are covered by the Jones Act can be confusing. An experienced maritime attorney will be knowledgable and will seek additional benefits to which their injured client is entitled if the defendent(s) are found guilty.Now back to CSS code for a website.

<p class=”example”>This will produce a paragraph that uses the previously-defined example class.</p>

<H1 class=”example”>This will also format your header in the same way.</p>

You may specify the HTML element during the declaration:

p.example {color:white; font size:large}

which restricts the “example” class to the paragraph element.

A similar effect is found when using the ID selector, represented by a hash (number sign) character:

#example {color:gray; font size:small}

<p id=”example”>This will also produce a paragraph that uses the previously-defined example class.</p>’

When to use ID vs. Class: according to validation standards, ID may only be used once on a layout, while Class can be used any number of times. Therefore, the usual practice is to use ID for headers, sidebars, or anything else that has only one overall instance.

Additionally, you may use multiple selectors (including Class and ID selectors) with the same set of declarations, simply by using a comma between the selectors:

p, H1, H2, .example {color:red; font size:large}

will apply the same values to paragraphs, headers 1 & 2, and anything given the “.example” tag (though there are certainly other, cleaner ways to achieve this…)

Many of the attributes of CSS use the same names as HTML, making the transition even easier. Also, many of the differences that do exist are more intuitive in CSS, making it easier to ‘read’ when you’re still unfamiliar with it.

Colors, for example, uses the same so-called ‘hexadecimals’ that HTML used, and even the same color names (though ‘valid’ color names are still limited to aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, purple, red, silver, teal, white, and yellow).

Text attributes are also similar, though CSS uses some clearer language. For instance, italics are referenced by {font-style:italic} rather than <i> or <em> (or <dfn>, <var>, <cite>, etc.). CSS also supports {font-style:oblique}, a more subtle italic, but not all browsers recognize this style.

Leave a Reply

Your email address will not be published. Required fields are marked *