Note that there are some explanatory texts on larger screens.

plurals
  1. POasp.net webforms nested master pages and css
    primarykey
    data
    text
    <p>I have an issue right now where I am using asp.net web forms to create a two column layout. I can create a 2-column layout with no problem in the master page with the code below.</p> <pre><code>&lt;%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site1.master.cs" Inherits="WebApplication5.Site1" %&gt; &lt;!DOCTYPE html&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt; &lt;head runat="server"&gt; &lt;title&gt;&lt;/title&gt; &lt;asp:ContentPlaceHolder ID="head" runat="server"&gt; &lt;/asp:ContentPlaceHolder&gt; &lt;link href="/css/bootstrap.min.css" rel="stylesheet" /&gt; &lt;link href="/css/custom.css" rel="stylesheet" /&gt; &lt;/head&gt; &lt;body&gt; &lt;div class="container-fluid"&gt; &lt;form id="form1" runat="server"&gt; &lt;div id="sidebar"&gt; &lt;asp:Menu ID="Menu1" runat="server"&gt; &lt;Items&gt; &lt;asp:MenuItem Enabled="true" Text="Main Menu"&gt;&lt;/asp:MenuItem&gt; &lt;asp:MenuItem Enabled="true" Text="Sub Page"&gt;&lt;/asp:MenuItem&gt; &lt;/Items&gt; &lt;/asp:Menu&gt; &lt;/div&gt; &lt;div id="content"&gt; &lt;div&gt; &lt;asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server"&gt; &lt;/asp:ContentPlaceHolder&gt; &lt;/div&gt; &lt;/div&gt; &lt;/form&gt; &lt;/div&gt; &lt;/body&gt; </code></pre> <p></p> <p>However as soon as a add another master page that inherits this masterpage and then add a child page to the secondary master the body height of my css does not change based on the elements of the page. It stays with the same pixels as the child page that is wired up to the master above.</p> <p>Here is the CSS I am using. The two columns extend to the bottom on the first page, but as soon as I go to another page where the elements inside the columns are bigger than the first the body stays at the same length</p> <pre><code>#sidebar, #content { position: absolute; top:0; bottom:0; } #sidebar { left: 0; width: 15em; background-color: bisque; } #content { left: 18em; right:0; background-color:bisque; } </code></pre> <p>This is a hard problem for me to describe, but any clues to at least get me pointed in the right direction would be very appreciated.</p> <p>Thanks</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload