DIV tag and usage in CSS and HTML
by "sfmalo" <sfmalo(at)msn.com>
|
Date: |
Tue, 6 Nov 2001 22:53:32 -0800 |
To: |
<hwg-basics(at)hwg.org> |
|
todo: View
Thread,
Original
|
|
Jennifer and Holly -
Last month there was a discussion about the <div> tag and how to =
effectively use it. This just arrived from another discussion list I =
belong to ... and thought I'd pass it along FWIW.
Sharon
The only way i've found that works if if I put some
> thing like
> a.classname:hover{color:red}
> but this requiresthat I put the class statment in each link, I'd like =
to
> beable to just have the div that makes up the menu have something in =
its
> class.
Here is a solution...you can assign a class to a div and then wrap the =
file
in that div:
I have a file named 10alpha.html and I want the links a different
color...green... and size...18px
a:link{font-family: Arial;
color:#0000dd;font-size:12px;line-height:16px;
font-weight:800;text-decoration:underline;}
a:visited{font-family: Arial;
color:#0000dd;font-size:12px;line-height:16px;
font-weight:800;text-decoration:underline;}
a:hover{font-family: Arial;
color:#0000dd;background:#fff;font-size:12px;
font-weight:800; text-decoration:underline;line-height:16px;}
a:active{font-family: Arial;
color:#FF0000;font-size:12px;line-height:16px;
font-weight:800;text-decoration:underline;}
.10alpha{border-left:1px solid #0000c8;
font-family: verdana;
width:100%;
vertical-align: middle; text-align: center;}
div.10alpha a:link{
font-size: 18px; font-weight:600;
color:green;
text-decoration:underline;}
div.10alpha a:visited{
font-size: 18px; font-weight:900;
color:green;
text-decoration:underline;}
div.10alpha a:hover{
font-size: 18px; font-weight:900;
color:green;background:white;
text-decoration: underline; }
div.10alpha a:active{
font-size: 18px; font-weight:900;
color:#ff0000 ;
text-decoration:underline}
And in the body of 10alpha.html
<div align=3D"center"class=3D"10alpha" =
style=3D"position:relative;top:-6px;">
<a href=3D"11links.html#a">A</a>
<a href=3D"11links.html#b">B</a>
<a href=3D"11links.html#c">C</a>
<a href=3D"11links.html#d">D</a>
</div>
Russell Griechen
-------------------------------------------------------------------------=
--
Sharon F. Malone
"web design and Internet writing services"
http://www.24caratdesign.com
sfmalo(at)24caratdesign.com
HTML: hwg-basics mailing list archives,
maintained by Webmasters @ IWA