<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>
这是我用于页眉的 html 代码。我也有类似的页脚 html 代码。 bcoz 与 anchor 标记相同的公共(public)类,页眉和页脚受到影响。我如何摆脱这个问题,使用 div 标签 (menu_header_top_right) 中的 id 调用 anchor 标签。请给我 css 中的类代码......不确定我是否足够清楚......
最佳答案
像这样使用 css:
#header a{ /* link styles for header */
color:#00ff00;
}
#footer a{ /* link styles for footer */
color:#0000ff;
}
用您自己的 ID 名称替换链接的任何样式。
关于html - 使用与特定 id 相对应的样式的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3377765/