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.
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.
dotnet_CH
Member
40 Points
278 Posts
How to change the width of MainContent for different pages
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>
<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"
Honnappa
Participant
1112 Points
534 Posts
Re: How to change the width of MainContent for different pages
Apr 19, 2012 10:36 AM|LINK
Use table Element
My Profile
riak
Member
268 Points
90 Posts
Re: How to change the width of MainContent for different pages
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.
dotnet_CH
Member
40 Points
278 Posts
Re: How to change the width of MainContent for different pages
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
riak
Member
268 Points
90 Posts
Re: How to change the width of MainContent for different pages
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
Ruchira
All-Star
44362 Points
7194 Posts
MVP
Re: How to change the width of MainContent for different pages
Apr 19, 2012 12:07 PM|LINK
hello,
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.
My Tech blog | My YouTube ChannelPlease 'Mark as Answer' if this post helps you.