CS174
Chris Pollett
Sep 11, 2013
input:hover {color:red} /* input tag will turn red when mouse over. */ input:focus {color:green} /* when click into input field, it will turn green */
<style type="text/css"> div:first-child b { color:blue } div:before { content:"The following div tag has something to tell you: "; } </style> <div> <b>I'm blue</b> <b>But I'm not</b> </div>
rgb(0, 0, 0) /*decimal */ #C8C8C8 /*hex */
<li style="list-style-image: url(mybullet.png)"> item </li>
body {background-image: url(background.jpg);}
<style type="text/css"> p.first {position: absolute; top:1in; left:2in;} p.second {position: relative; left:-1in;} </style> <p class="first">displays one inch down two inches from left of top of screen</p> <p class="second">displays 1inch to the left of where the first paragraph finished</p>
<input type="text" name="fname" accesskey="f" />