Blog Reader RSS LoveCherry 技术无极限 GEO MVP MS Project开源技术

User Control && MasterPage

1.user control and masterpage  
2.Scrollbars for ContentPlace Holder
ASK:
Hi All,
 My problem is that I cannot work out how to make the masterpage Content Section's 'contentplaceholder' scrollable.  In addition to this if I change the screen resolution or view in different browers everything gets stretched and/or misaligned.
Basically I want the left ad panels, banner and footer sections to remain static across the whole website and only the content section to change as each new page is loaded into it. However, if the content page has a lot of text/images etc I want that section to be scrollable, and only scrollable where there is an overflow on the content sections height. At the moment the content panel grows and pushes my footer off the bottom of the page.
I am calling this page using a javascript (window.open()) method with scrollbars=no. Because i don't want any scrollbars to entire page. I need scrollbars only to the ContentPlaceholder.
I used the DIV tag but it is also not working. Please help me in this regard.
Best answer:

Hi sivavenugopal,

AFAIK there is no way to add scrollbars to the contentplaceholder. But maybe it helps to put the comtentplaceholder inside a div. The div must reside in the masterpage. Give the div style a fixed width an hight. Add the overflow scrollbar attribute to divs vertical axis. Now it should works as expected.

Here is an example the works as expected on my machine.

the master page

 

<div id="MainContent" runat="server" class="MainContent">
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</div>

 and the css class

.MainContent
{
position: relative;
top: 0px;
left: 0px;
width: 100%;
overflow: auto;
cursor: default;
}

 Hope that could help you



posted @ 2008-04-11 21:44 大宋提刑官 阅读(64) 评论(0)  编辑 收藏 网摘

标题  
姓名  
主页
Email (博主才能看到) 
验证码 *  看不清,换一张 [登录][注册]
内容(请不要发表任何与政治相关的内容)  
  登录  使用高级评论  新用户注册  返回页首  恢复上次提交      
该文被作者在 2008-04-11 22:17 编辑过
Google站内搜索
[推荐职位]上海盛大网络招聘架构师



China-pub 计算机图书网上专卖店!6.5万品种 2-8折!
近千种 9-95 新二手计算图书火热销售中!
开发者征途系统新作:《设计模式——基于C#的工程化实现及扩展》

相关文章:


相关搜索:
一品梅的小本本

相关链接: