troubleshooting Question

DIV 100% height not fillng page in ASP.NET

Avatar of Belazir
Belazir asked on
39 Comments1 Solution6290 ViewsLast Modified:
Title says it all really.  I've switched a website I was developing from Java to ASP after going on a course recently.  However the CSS that I carried over doesn't seem to work the same, and a DIV that I have set to 100% height using a CSS class is not sizing to 100%, it's sizing to whatever the contents are.  The only difference is I'm using . and the class attribute instead of # and the id attribute.

CSS and relevant ASP code shown, I'm doing this on a Master page although I don't expect that to make any difference?

	.shortmenu {
		background: #007080;
		float: left;
		width: 180px;
		height: 100%;
		padding: 6px 6px;
		font-size: 0.9em;
		border-left: 5px solid white;
		font-size: 12px; 
		font-family: verdana; 
		color: white;
    <form id="form1" runat="server">
    <div class="container">
		<div class="header">
			<img src="Logo_small.jpg" alt="Leagues Ahead" /><br />
        <div class="shortmenu">
			<br />
			<asp:Login ID="lgnMain" runat="server" BorderPadding="0" BorderStyle="None" BorderWidth="0px" Font-Names="Verdana" Font-Size="10pt" LoginButtonText="Log in" PasswordLabelText="Password" PasswordRequiredErrorMessage="Password is required" RememberMeText="Remember me" TitleText="You are not logged in" UserNameLabelText="Username" UserNameRequiredErrorMessage="Username is required">
				<TitleTextStyle CssClass="login" Font-Bold="True" HorizontalAlign="Left" />
				<CheckBoxStyle CssClass="login" HorizontalAlign="Left" />
				<TextBoxStyle Width="75pt" />
				<LoginButtonStyle CssClass="login" Font-Bold="True" />
				<LabelStyle CssClass="login" />
				<FailureTextStyle CssClass="login" />
        <div class="headmenu">
        <div id="divMain" class="content">
			<asp:contentplaceholder id="placeholder" runat="server">
		<div class="footer">

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 39 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 39 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros