Tawni
10-06-2007, 05:40 AM
Hello,
I don't mind spending money to learn, I just recently purchased 2 CSS books from "sitepoint". My Problem is when you search the examples and cant find what the authors are talking about in their code.
I need Help Explaining Some CSS code here:
1. What is ".menu" I cant find it anywhere in the forms or html for that matter only class named menu.
then you will see he separates allot of stuff re: menu rather then stick it all in one place.
Code below : I will Comment areas I am confused in , Thanks in Advance
/****************************************************************************/
/* Site menu styles. */
/****************************************************************************/
#menuBar,
.menu <---------------------------------.menu
{
background-color: #000000;
}
#menuBar,
.menu
{
border: 1px solid #304050; <----why not in same block of code
}
#menuBar
{
margin-bottom: 1em;
}
#menuBar a,
.menu a
{
display: block;
font-size: 9pt;
}
#menuBar table
{
border-collapse: collapse;
}
#menuBar td
{
border-right: 1px solid #FFFF00;
padding: 0px;
text-align: left;
}
#menuBar a <------I take it the a is a Link or anchor tag
{
height: 100%;
padding: 2px 1em;
}
#menuBar a span.arrow
{
font-size: 8pt;
}
#menuBar a.hasMenu:hover
{
text-decoration: none;
}
.menu
{
position: absolute;
visibility: hidden;
z-index: 1;
}
.menu a
{
padding: 4px 1.5em;
}
#menuBar a:active, .menu a:active, < ---Completely lost here big block code Nothing Defined Color wise etc
#menuBar a:hover, .menu a:hover, < ---Completely lost here big block code
#menuBar a:focus, .menu a:focus, < ---Completely lost here big block code
#menuBar a.ieFocus, .menu a.ieFocus /* For IE browsers. */
{
background-color: #FFFF00;
}
.menu .separator
{
border-bottom: 1px solid #FF0000;
margin: 2px .5em;
}
*************************************** Now this author..
This Author Groups things nicely...
#content {
margin: 0 auto;
padding: 1em 0;
width: 500px;
background-color:#fff;
font-size: 1.125em;
line-height: 1.75em;
text-align: left;
}
a:link, a {
border-bottom:1px dotted #960;
color: #960;
text-decoration: none;
}
a:hover {
border-bottom:1px solid #960;
}
********************* But he does this DOT THing To
img.intro { <----------------------------- See I cant find what it means
padding: 4px;
border:3px double #ccc;
background-color: #fff;
margin:0 -7px;
}
*************************
My problem is I have a site running that uses the first CSS Script, and Iwant to over haul it now I have a better Idea how this stuff works, but I am not advanced enough when they throw trick bags like ".menu" on me and not talk about it in the Book ...LOL
Bottom Line I am trying to learn, and end result figure out How I can On Hover change Background Color and text and the opposite colors when menu is idle
Thanks for Looking
I don't mind spending money to learn, I just recently purchased 2 CSS books from "sitepoint". My Problem is when you search the examples and cant find what the authors are talking about in their code.
I need Help Explaining Some CSS code here:
1. What is ".menu" I cant find it anywhere in the forms or html for that matter only class named menu.
then you will see he separates allot of stuff re: menu rather then stick it all in one place.
Code below : I will Comment areas I am confused in , Thanks in Advance
/****************************************************************************/
/* Site menu styles. */
/****************************************************************************/
#menuBar,
.menu <---------------------------------.menu
{
background-color: #000000;
}
#menuBar,
.menu
{
border: 1px solid #304050; <----why not in same block of code
}
#menuBar
{
margin-bottom: 1em;
}
#menuBar a,
.menu a
{
display: block;
font-size: 9pt;
}
#menuBar table
{
border-collapse: collapse;
}
#menuBar td
{
border-right: 1px solid #FFFF00;
padding: 0px;
text-align: left;
}
#menuBar a <------I take it the a is a Link or anchor tag
{
height: 100%;
padding: 2px 1em;
}
#menuBar a span.arrow
{
font-size: 8pt;
}
#menuBar a.hasMenu:hover
{
text-decoration: none;
}
.menu
{
position: absolute;
visibility: hidden;
z-index: 1;
}
.menu a
{
padding: 4px 1.5em;
}
#menuBar a:active, .menu a:active, < ---Completely lost here big block code Nothing Defined Color wise etc
#menuBar a:hover, .menu a:hover, < ---Completely lost here big block code
#menuBar a:focus, .menu a:focus, < ---Completely lost here big block code
#menuBar a.ieFocus, .menu a.ieFocus /* For IE browsers. */
{
background-color: #FFFF00;
}
.menu .separator
{
border-bottom: 1px solid #FF0000;
margin: 2px .5em;
}
*************************************** Now this author..
This Author Groups things nicely...
#content {
margin: 0 auto;
padding: 1em 0;
width: 500px;
background-color:#fff;
font-size: 1.125em;
line-height: 1.75em;
text-align: left;
}
a:link, a {
border-bottom:1px dotted #960;
color: #960;
text-decoration: none;
}
a:hover {
border-bottom:1px solid #960;
}
********************* But he does this DOT THing To
img.intro { <----------------------------- See I cant find what it means
padding: 4px;
border:3px double #ccc;
background-color: #fff;
margin:0 -7px;
}
*************************
My problem is I have a site running that uses the first CSS Script, and Iwant to over haul it now I have a better Idea how this stuff works, but I am not advanced enough when they throw trick bags like ".menu" on me and not talk about it in the Book ...LOL
Bottom Line I am trying to learn, and end result figure out How I can On Hover change Background Color and text and the opposite colors when menu is idle
Thanks for Looking