Anonymous
Not logged in
Talk
Contributions
Create account
Log in
Publication Station
Search
Editing
Courses/Design & Technique-Essential Web Design/04
(section)
From Publication Station
Namespaces
Page
Discussion
More
More
Page actions
Read
Edit
History
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=selectors= Example http://codepen.io/anon/pen/YGpPyy CSS selectors allow the selection of html elements to be styled.<br/> Their scope can be very broad, such as all the elements (*), or all the elements that that share a given tag.<br/> To more fine grained selectors, like descendents and id.<br/> To pseudo class selectors, that are triggered by a certain action.<br/> ==element== <code>p {font-weight:bold}</code> ==All(star)== <code>*</code>. Star targets all the elements in a page <code>p {font-weight:bold}</code> ==id== <code>#</code>. Id targets the (only 1) element with the given id <code>p#foo {font-weight:bold}</code>. ==class== <code>.</code>. Class targets several elements that share the same class <code>.bar {color: blue} </code> ==id vs class== [[File:Class-id.png]] ==descendents== elements that are descendents another element, like the anchors within a list item, and not other anchors <code>li a{color:gree;}</code>. ==direct descendents== elements that '''direct children''' of another element <code>li > a{color:gree;}</code>. ==pseudo classes== E.g. * All links that have been visited <code>a:visited {transform: rotate(0.5turn)}</code>; * when hoverving a link <code>a:hover{background: red;}</code> More on Pseudo Classes: https://developer.mozilla.org/en/docs/Web/CSS/Pseudo-classes More on CSS selectors in * https://developer.mozilla.org/en/docs/Web/Guide/CSS/Getting_started/Selectors * https://code.tutsplus.com/tutorials/the-30-css-selectors-you-must-memorize--net-16048
Summary:
Please note that all contributions to Publication Station are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
Publication Station:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation
Main navigation
Main page
Printmaking Studio
Print Studio
Dig. Publishing Studio
Namespaces
Grafiwiki
Random Page
Log in
Wiki tools
Wiki tools
Page tools
Page tools
User page tools
More
What links here
Related changes
Page information
Page logs