Thursday, January 5, 2012

[web-design] Re: css inheritance issue

 



Hi Sharon,
No it's not inheriting child to child - it's the exact same rule. Look closely and you'll see you're missing the #footer id for a:active and a:visited. So you've created the exact same rule with more properties. Properties in the second rule will be added because they were't declared in the first rule while others that were declared in the first rule will be overridden in the second. The properties that will be overridden depends on the order in which you declared the rules .
HTH
Peggy

--- In web-design@yahoogroups.com, "sharon werner" <sharonwerner@...> wrote:
>
> I neglected to mention the issue that is troubling me, which is the white top bar being inherited from the nav bar ordered list.
>
> --- In web-design@yahoogroups.com, "sharon werner" <sharonwerner@> wrote:
> >
> > I've graduated from modifying purchased templates to designing my own template using Dreamweaver CS4...well, based on a built-in very basic template (3 column fixed with header and footer), with some help from the w3schools site to set up the styling of the main navigation and the Collison book that Joni recommended.
> >
> > You've all been so helpful to date...I hope you can help again. The preview link is:
> >
> > http://www.turningleafwebanddesign.com/med-template/index.html
> >
> > I'm having an issue with styling links, and I'm beating my head against the metaphorical wall. I have set up a separate styles for my footer as follows, to create a link to the "disclaimer" page:
> >
> > .thrColFixHdr #footer {
> > background:#9C6;
> > background: url(../images/footer.jpg) left top no-repeat;
> > height: 85px;
> > }
> > #footer a:hover,a:active
> > {
> > color: #000000;
> > text-decoration: underline;
> > }
> > #footer a:link,a:visited {
> > font-weight:bold;
> > color:#FFFFFF;
> > text-decoration:underline;
> > }
> >
> > I've used Bas's trick of opening the site in Google Chrome to "inspect element." It seems that the footer is inheriting additional styles from the main_nav style:
> >
> > #main_nav a:link,a:visited
> > {
> > display:block;
> > font-weight:bold;
> > color:#FFFFFF;
> > width:150px;
> > height: 25px;
> > border-top:solid white;
> > border-width: thin;
> > text-align:center;
> > padding:4px;
> > text-decoration:none;
> > }
> > #main_nav a:hover,a:active
> > {
> > background-color: #9C6;
> > color: black;
> > }
> >
> > I'm sure I'm missing something obvious. But isn't this a child inheriting from a child?
> >
> > Appreciate any thoughts!
> >
> > Sharon
> >
>

__._,_.___
Recent Activity:
---------------------------------------------------------------
web-design@yahoogroups.com is sponsored, owned, and founded by Technogypsie Designs (formerly Wandering Leaf Designs)
~etching your presence on the web  
leafworks@yahoo.com  

To unsubscribe or change your settings:
Please go to http://www.yahoogroups.com
- login, - choose group to modify, - change to unsubscribe,
web only, digest, or single post mode
By email: send a email from your email address receiving this
post to web-design-unsubscribe@yahoogroups.com
MARKETPLACE

Stay on top of your group activity without leaving the page you're on - Get the Yahoo! Toolbar now.

.

__,_._,___

0 comments:

Post a Comment