Link to home
Start Free TrialLog in
Avatar of Michael Sterling
Michael SterlingFlag for United States of America

asked on

How do I use css to find my panel's ID?

If my HTML looks like this:

<%@ Page Title="" Language="C#" MasterPageFile="Site.master" AutoEventWireup="true"
    CodeFile="UARForm.aspx.cs" Inherits="UARForm" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <link type="text/css" rel="stylesheet" href="Styles/UARForm.css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="Server">
    <asp:Panel ID="pnlManager" runat="server">
    </asp:Panel>
    <asp:Panel ID="pnlHR" runat="server">
        <div class="divHR" id="divHR">
            <asp:Label ID="lblHRHeader" runat="server" Text="Approval Tracking:" />
        </div>
    </asp:Panel>
</asp:Content>

Open in new window


why does this:

#pnlHR
{
    margin: 20px 0 0 0;
}

 not work to add 20px to the top margin?
ASKER CERTIFIED SOLUTION
Avatar of Gary
Gary
Flag of Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Michael Sterling

ASKER

Thank you. Will do. Before I do that, what adverse affects will that have on my panel, that I need to be concerned about? Removing the "runat" attribute?
Won't have any effect for a panel.
Thank you.
Thanks for your input.