Cascading Style Sheets
This is the main page for CSS discussion.
I am using the term "items" to mean HTML Elements.
Selectors are discussed pretty early on in the CSS Schools tutorial, so I guess they are important. Colors (Colours), Backgrounds, Borders, Padding and Margins follow.
The Universal Selector is the * character. It can be used to select many elements, I am using it to select a box-sizing
Class Selectors and definitions
These are defined in the css file with a starting "." (full stop) - for example .header and .menu
You can specify (define) single and multiple HTML Selectors and specify how they are to perform within a class.
For example .menu ul - .menu li and .menu li a
This means you can specify (as in my rwd.css file) the menu buttons. The ul has a list-style-type of none. The menu items .menu li have specified text and background colors - margins and padding - the text is aligned centrally and the buttons have a shadow.
Further to this the <a> (anchors) have no text-decoration and display as "block". Hover behaviour is also specified.
Above is an example of a single menu button taking its major style from rwd.css plus additional style to centre the button in the content and to set the width to 200px.
The W3C Schools website has many examples of alternative menu systems. Things have progressed a lot since I started with this research. There are examples of dropdowns implemented in CSS. I had looked at this in the past and decided not to go that way.
An Attribute Selector in my main css file:
The essence of this is that I think that what happens here is that class with a Universal Selector (^) matches with "rcontent-". If it does the padding and the float are applied to the class.
If I float right the menu will appear on the right of the screen. I can also reduce the padding but I think 15px is about right.
What the W3C Spec/Recommendation says:
Selectors allow the representation of an element’s attributes. When a selector is used as an expression to match against an element, attribute selectors must be considered to match an element if that element has an attribute that matches the attribute represented by the attribute selector.
Children and parents - Specificity Hierarchy
I need to look at this!