开发者

Asp.Net Masterpage - Centred Full Height Div Issue

开发者 https://www.devze.com 2022-12-21 09:08 出处:网络
I have created a simple HTML page with a centred DIV for content. I have a repeater image on the DIV to give a border effect.

I have created a simple HTML page with a centred DIV for content. I have a repeater image on the DIV to give a border effect.

When viewing the HTML page in IE & FF, it loads correctly. N开发者_开发技巧o scrollbars and all divs fill the whole page to 100%.

When I move this over to a ASP.Net MasterPage, it all goes pear shaped. The centre DIV only fills as far as the content goes.

I've tried several attacks, but I'm out of luck. I've tried JavaScript to onLoad resize the div, setting the form elements to have a style attribute - nothing however gives me the same results as the standard HTML page.

So, what I am I doing wrong? Why do I suck at this? Please show me how this is done.

Many thanks,


Run your simple page, view the HTML source and save it. Then run your master page example, view the HTML source and save it. Compare the two, which will let you know what HTML and/or CSS differences you have. From there, make changes to your master and content pages so that they output the same HTML as your simple page.


Sorry, should have posted before - I resolved the issue. It was the DOCTYPE element at the top of the page. Removing this means it works.

I did pretty much what you suggested, using Beyond Compare.

Thanks for you help though.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号