Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Apr 19, 2012 12:07 PM by Ruchira
Apr 19, 2012 10:31 AM|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 10:36 AM|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 10:40 AM|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 10:58 AM|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 11:13 AM|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 12:07 PM|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.