我的主要问题是这样的:
    我在母板页中有A标记要引用CSS1样式表中的样式,而我内容页中的A标记想引用CSS2样式表中的样式,
    不知道该怎么实现。    现在我遇到了这个问题:    我在母板页中有个导航,用的是LinkButton,但是LinkButton解析成HTML代码的时候解析成了A标记
    我现在在母板页中引用了CSS1样式表如下:
    
        a:link, a:visited
        {
    text-decoration: none;
    font-size: x-large;
    font-family: 隶书;
    color: #6F6A60;
         }
         a:hover, a:active
        {
    text-decoration: none;
    font-family: 隶书;
    color: Black;
         }
    
    引用了后LinkButton是引用了这个样式,但是内容页中的A标记样式也变成了这个样式。
    
    CSS2样式表:
    
         a:link, a:visited
        {
    text-decoration: none;
    font-size: 14px;
    font-family: 宋体;
    color: Black;
         }
         a:hover, a:active
        {
    text-decoration: underline;
    font-size: 14px;
    font-family: 宋体;
    color: Black;
         }   
    
    
    如果我在内容页中引用了CSS2样式表,那母板页中的样式也成了CSS2中的样式了。    如果我用ID控制或者Class类控制,那我如何控制?
    如果用内联样式我怎么控制A标记的4个状态?求高人出现!!!!!

解决方案 »

  1.   

     #masterPage a:link, a:visited
            {
            text-decoration: none;
            font-size: x-large;
            font-family: 隶书;
            color: #6F6A60;
             }
         #masterPage    a:hover, a:active
            {
            text-decoration: none;
            font-family: 隶书;
            color: Black;
             }
     #contentPage a:link, a:visited
            {
            text-decoration: none;
            font-size: x-large;
            font-family: 隶书;
            color: #6F6A60;
             }
         #contentPage    a:hover, a:active
            {
            text-decoration: none;
            font-family: 隶书;
            color: Black;
             }
      

  2.   

    母板页中LinkButton 放在一个div里面,如
    <div id="divMenu">
      //一些LinkButton 
    </div>然后,母板的CSS定义
    #divMenu a:link, #divMenu a:visited
            {
            text-decoration: none;
            font-size: x-large;
            font-family: 隶书;
            color: #6F6A60;
             }
           #divMenu  a:hover,#divMenu a:active
            {
            text-decoration: none;
            font-family: 隶书;
            color: Black;
             }
    内容页面也可以类似这么做。
      

  3.   

        如果我用ID控制或者Class类控制,那我如何控制? 
        如果用内联样式我怎么控制A标记的4个状态? 
    class用.控制
    id用#控制
    楼上的是id控制
    要是想用class 换成.就可以~~
      

  4.   

     .masterPage a:link, a:visited
            {
            text-decoration: none;
            font-size: x-large;
            font-family: 隶书;
            color: #6F6A60;
             }
         .masterPage    a:hover, a:active
            {
            text-decoration: none;
            font-family: 隶书;
            color: Black;
             }你在你的LinkButton 里面的CssClass 属性写上 CssClass = "masterPage" 应该是可以区分的这个就是分开写a 标签的样式就可以了。内容页就写成
     .contentPage a:link, a:visited
            {
            text-decoration: none;
            font-size: x-large;
            font-family: 隶书;
            color: #6F6A60;
             }
         .contentPage    a:hover, a:active
            {
            text-decoration: none;
            font-family: 隶书;
            color: Black;
             }然后内容页面的a 标签就调用 .contentPage 这个样式
      

  5.   

    可以将样式2放到内容也里, 虽然 在 编辑 内容页 vs 提示不能放 ,但是没关系的 如果要编辑内容页的,临时去掉css2 就可以了
      

  6.   

    在母板页中把LinkButton 放在<div>中,但是要用ID控制器,
    而在内容页中不能用ID控制也不能用类控制,只有全页面的才行