Sachindra
Sachindra

Reputation: 6989

issue with using style corresponding to a particular id

<div class="header_bottom">
    <div class="header_bottom_right_main">
    <div class="header_bottom_right_menu_right">
    <div class="header_bottom_right_menu_right_text" id="menu_header_top_right">
        <table width="100%" border="0" cellpadding="0" cellspacing="1">
                <tr>
                <td nowrap="nowrap">
                <a href="" class="mainlevel" id="active_menu">Home</a>

this is the html code that i have used for header.i have a similar html code for the footer as well. bcoz of the same common class for anchor tag , the header and the footer are getting affected. how do i get rid of this problem , calling the anchor tag using the id off the div tag (menu_header_top_right).. please get me the class code in css..... not sure if i am clear enough...

Upvotes: 0

Views: 35

Answers (3)

harpax
harpax

Reputation: 6106

Not sure if I got you right, but I think you are trying to adress the anchor that appears in the footer with the same class?! If so, then:

#menu_header_top_right a.mainlevel {
    ..
}

Upvotes: 0

Nick Craver
Nick Craver

Reputation: 630429

In your case it looks like this:

#menu_header_top_right a { /* styles here */ }

This will style any <a> tag within that <div id="menu_header_top_right "> which seems to be what you're after.

Upvotes: 0

Sarfraz
Sarfraz

Reputation: 382696

Use css like this:

#header a{               /* link styles for header */
  color:#00ff00;
}

#footer a{               /* link styles for footer */
  color:#0000ff;
}

Replace the id names with your own along with any styles for the link.

Upvotes: 1

Related Questions