Nest Classes and CSS tags

0

I'm developing a website, Administrative side, I already set up MasterPage and now defining the layout of the child pages, where I came across a problem, which I need help with. Here is the code that interests the child page:

<asp:Content ID="ContentFormAdmin" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="FormAdminBase" class="container">
        <div class="row">
            <header id="HeaderFormAdmin">
                <h2>Cadastro dos Serviços Prestados</h2>
            </header>
        </div>
    </div>
</asp:Content>

Then I created CSS as follows:

#FormAdminBase {
    background-color: #285ce6;
    max-width: 1170px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 5px;
    margin-bottom: 3px;
    text-align: center;
    font-size: 18px;
    color: whitesmoke;
    padding: 15px;
    height: calc(100% - 5px);
    border: 3px red ridge;
}

#FormAdminBase h2 {
    text-align: left;
    color: white;
    text-shadow: 4px 4px 5px rgba(31, 54, 99, 0.73);    
}

The thing is that "Service Logs" is aligned to the left of the browser, not the left, inside the " FormAdminBase " as I imagined it would look. I would like to know how to nest everything in " FormAdminBase ".

I'm using ASPX, C #, with Bootstrap!

I have already researched and found nothing directed, it may even be that I did not know how to search, but my request for help is still!

    
asked by anonymous 22.06.2017 / 20:32

1 answer

1

Thanks for the help Wtrmute! I did as you indicated and I saw that my error was to use <header> , so I deleted it and put div , so it worked as expected.

It looks like this:

<asp:Content ID="ContentFormAdmin" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="FormAdminBase" class="container">
        <div class="row">
            <div id="HeaderFormAdmin">
                <h2>Cadastro dos Serviços Prestados</h2>
            </div>
        </div>
    </div>
</asp:Content>

Well, it was this, header was right, but to be used in MasterPage and not in those that inherit it.

Following the Anderson tip, I want to clarify that header is treated in CSS as follows:

header {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 60px;
}

So, when declaring use on the daughter, would give the error reported initially.

Once again, my thanks! Always learning!

    
22.06.2017 / 21:50