Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

CSS positioning horizontal blocks

Posted on 2011-02-11
4
Medium Priority
?
325 Views
Last Modified: 2012-05-11
i want to split my spreadsheet into three horizontal blocks top, middle and bottom. I want the top to take up 15% of the screen, the middle 80% and the bottom 5%. I also want them to keep these % as the browser window is resized. Ive tried looking at relative , floating etc but havnt been able to work this one out
0
Comment
Question by:LBGUC04
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 40

Expert Comment

by:Gurvinder Pal Singh
ID: 34869891
this one worked for me

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
	<style>
		body, #container
		{
			height:100%;
			width:100%;
		}
			
		.header
		{
			height:15%;
			width:100%;
			background-color:black;
		}
		.content
		{
			height:80%;
			width:100%;
			background-color:blue;
		}
		.footer
		{
			height:5%;
			width:100%;
			background-color:red;
		}
	</style>
</HEAD>

<BODY>
	<div id="container">
		<div class="header"></div>
		<div class="content"></div>
		<div class="footer"></div>
	</div>
</BODY>
</HTML>

Open in new window

0
 
LVL 9

Accepted Solution

by:
user_n earned 2000 total points
ID: 34869913
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
      <style type="text/css">
      #div_15{
            height:15%;
      }
      #div_80{
            height:80%;
      }
      #div_5{
            height:5%;
      }
      #div_full{
            position:absolute;
            width:100%;
            height:100%;
            display:block;
      }
      </style>
</head>
<body>
<div id="div_full">
      <div id="div_15"></div>
      <div id="div_80"></div>
      <div id="div_5"></div>
</div>
</body>
</html>
0
 
LVL 40

Expert Comment

by:Gurvinder Pal Singh
ID: 34870089
@LBGUC04: what??? did my solution not worked??
0
 

Author Comment

by:LBGUC04
ID: 34888443
no it didnt work for me sorry
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer…
Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
Suggested Courses

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question