如何在CSS,HTML中引用这一行

时间:2021-09-06 17:00:20

I am still new to CSS and HTML in general, so my knowledge is limited. I want to move some style code into css out of my HTML code. I have this:

我一般都是CSS和HTML的新手,所以我的知识有限。我想将一些样式代码从我的HTML代码中移到css中。我有这个:

<fieldset class="login"> 
   ...
   <asp:Button class="mybutton" ID="_login" runat="server" Text="Login" style="float:right; margin-right:20px;"/>
   ...
</fieldset>

And in CSS i reference the entire login box like this:

在CSS中我引用整个登录框,如下所示:

fieldset.login
{
    ...
}

but what I can't figure out is the equivalent of "fieldset.login" so that I can reference the <asp:Button> line. I've tried

但我无法弄清楚的是相当于“fieldset.login”,以便我可以引用 行。我试过了 :button>

fieldset.login Button {}

And other things similar, but they don't seem to work for me. Thanks for your help.

和其他类似的东西,但它们似乎并不适合我。谢谢你的帮助。

1 个解决方案

#1


3  

You should be able to use this:

你应该可以使用这个:

fieldset.login .mybutton{
...
}

#1


3  

You should be able to use this:

你应该可以使用这个:

fieldset.login .mybutton{
...
}