Last post Apr 19, 2012 01:07 PM by Ruchira
Apr 19, 2012 11:31 AM|dotnet_CH|LINK
I am using Master page in my web site with following code
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
Now i want to set different height for different pages like here i want to set the height of "MainContent"
Apr 19, 2012 11:36 AM|Honnappa|LINK
Use table Element
<tr><td width="20%"><asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
<tr><td width="80%""><asp:Content ID="Content2" ContentPlaceHolderID="HeadContent" runat="server">
Apr 19, 2012 11:40 AM|riak|LINK
Height is spelt wrong.
With the page you create based on your master template. Put a div inside the content place holder and set the height of it in the CSS or use a table what ever you find easier.
putting height on a container is a bad idea though incase your content is bigger than the height of the container breaking your layout. You can use min-height to overcome this.
Apr 19, 2012 11:58 AM|dotnet_CH|LINK
Thanks for your reply.
Actually width of maincontent is define in the master I want to change it in the other web forms
Width of maincontent to define to large extent as most to the pages include gridview for reports but few form need to
have small width for the maincontent
Apr 19, 2012 12:13 PM|riak|LINK
width? i thought this was about height?
You can change the width using inline css. just change the width on the property menu on each web form page
Apr 19, 2012 01:07 PM|Ruchira|LINK
Changing the height of the masterpage content body does not make any sense. What I would do is, change the height of the content page it self then it would automatically adjust the masterpage height according to that.
Please 'Mark as Answer' if this post helps you.