473,549 Members | 2,699 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

getting DIVs to use remaining 100%

47 New Member
Hello,

i am having some troubles with DIVs.

heres my setup

i have a wrapper, 900px wide 100% height
nested header 100% wide 20px high
nested menubar 100%wide 80px high

now i want to use the 100% remaining (100% page - 100px) in a content wrapper. any idea how i may achieve this?

all the comments are dutch, my apologies. they just explain the functions

HTML:
Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml" >
  3. <head>
  4.     <title>Home</title>
  5.     <link rel="Stylesheet" href="Default.css" />
  6. </head>
  7. <body>
  8.     <!-- Deze div zorgt dat alles netjes binnen de 900px valt, dit is de "inpakker" van het hele zooitje -->
  9.     <div id="wrapper">
  10.  
  11.         <!-- De bekende header div -->
  12.         <div id="header">
  13.         </div>
  14.  
  15.         <!-- Het menu divje -->
  16.         <div id="menubar">
  17.  
  18.             <!-- Het logo!! -->
  19.             <img src="logo.png" height="80px" width="200px" style="" />
  20.  
  21.             <!-- De menulinks! in een mooi divje -->
  22.             <div id="menulinks">
  23.                 <a href="">Home</a>&nbsp;<a href="">Over</a>&nbsp;<a href="">Ontwerp</a>&nbsp;<a href="">Portfolio</a>&nbsp;<a href="">Contact</a>&nbsp;
  24.             </div>
  25.         </div>
  26.  
  27.             <!-- De imagepreview is voor het plaatje linksboven -->
  28.             <div id="imagepreview">
  29.                 <img src="logo.png" height=300px" width="400px" style="" />
  30.             </div>
  31.  
  32.     </div>
  33. </body>
  34. </html>
  35.  
CSS:
body {
/* Font settings */
font-family: Arial; /* Font Face in HTML */
font-size: 12px; /* Grootte, CSS gebruikt andere waarden, px vind ik zelf nog wel het handigste */
color: #000000; /* Zeer hinderlijk, is anders dan in HTML, testkleur */

/* Settings voor de vormgeving */
background-color: #777777; /* Achtergrondkleu r */
margin: 0px; /* (Gejat) zorgt dat er geen gat valt tussen de randen */
height: 100%; /* Zorg dat de hoogte 100% is voor de wrapper */
width: 100%; /* Zorg dat de breedte 100% is voor de wrapper */
position: absolute; /* Zorg dat alle afmetingen absoluut zijn */
}

a {
/* Font settings */
color: #800000; /* Schijnt hij niet mee te pakken in de body (voor duidelijkheid donker rood gemaakt) */
font-weight: bold; /* Maak het dikgedrukt */
text-decoration: none; /* Haal het lijntje weg */
}

a:hover {
/* Settings voor de link */
text-decoration: underline; /* Zorg dat er een streepje onder komt */
}

#wrapper {
/* Settings voor de vormgeving */
width: 900px; /* Altijd 900px breed */
height: 100%; /* 100% hoog, relatief aan zijn bovenliggende tag (body) */
margin: auto; /* Leuk iets, de marge wordt automatisch aangepast aan de breedte zodat het divje gecentreerd wordt */
background-color: #e7f5fa; /* Achtergrondkleu r (licht blauw/groen) */
}

#header {
/* Settings voor de vormgeving */
width: 900px; /* Altijd 900px breed */
height: 20px; /* De strip is 20px hoog */
background-color: #800000; /* Achtergrondkleu r (donker rood) */
margin: auto; /* Leuk iets, de marge wordt automatisch aangepast aan de breedte zodat het divje gecentreerd wordt */
}

#menubar {
/* Settings voor de vormgeving */
width: 900px; /* Altijd 900px breed */
height: 80px; /* Het menu is 80px hoog */
background-color: #96d563; /* Achtergrondkleu r (vaag groen) */
text-indent: 25px; /* Zorg dat er 25px ruimte zit aan de linkerkant */
position: relative; /* Zorg dat alle posities in en uit deze DIV relatief zijn */
border-bottom-width: 1px; /* Zet een balk neer van 1px */
border-bottom-style: solid; /* Zet een doorlopende streep neer */
border-bottom-color: #000000; /* Maak de streep zwart */
margin: auto; /* Leuk iets, de marge wordt automatisch aangepast aan de breedte zodat het divje gecentreerd wordt */
}

#menulinks {
/* Settings voor de vormgeving */
bottom: 0px; /* Zorg dat de DIV strak tegen de onderkant ligt */
right: 25px; /* Zorg dat de DIV 25px van rechts afstaat */
position: absolute; /* Zorg dat de posities absoluut zijn aan de bovenliggende tag (div menubar) */
}

#imagepreview {
/* Settings voor de vormgeving */
width: 400px; /* Breedte 400px */
height: 300px; /* Hoogte 100% zodat alles netjes op 1 scherm past */
top: 25px; /* Zet het blokje 25px van de bovenkant af */
left: 25px; /* Zet het blokje 25px van de linkerkant af */
padding-bottom: 25px; /* Zorg voor een 25px ruimte onder dit blokje */
position: relative; /* Zorg dat alle posities in en uit deze DIV relatief zijn */
}
Jun 24 '09 #1
1 2457
hsriat
1,654 Recognized Expert Top Contributor
Use position: fixed, top:100px, botton: 0px; overflow: auto;
This will need Strict DTD, which you are already following. And it won't work in IE6 and below.

(I was too reluctant to read the entire text, so I'm sorry if this's irrelevant.)
Jul 22 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

17
4655
by: John Hunter | last post by:
I have a largish data set (1000 observations x 100 floating point variables), and some of the of the data are missing. I want to try a variety of clustering, neural network, etc, algorithms on the data, and to keep life simple I want to reduce the dimensions of the matrix so that I have no missing values, since not all the algorithms are...
3
25733
by: Peter Jenkins | last post by:
I have some divs I am using to get a two column layout for a section of a page, like so; <div1> <div2> <div3> blah blah blah blah blah blah blah blah blah blah blah blah </div> </div> </div>
5
4999
by: Duane Lambe | last post by:
On some suggestions from this group, I've started to turn my internal helpdesky site for our company to non-absolute positioning. I've been reading O'Reilly's CSS book, and several web sites and tips. For the most part, things are going OK, but I can't seem to find an answer to a particular problem. Using a simpler example, below's some...
2
4747
by: Jakub Åukomski | last post by:
hi. i've got a problem as follows, to which i can't find a solution to: i've got two divs, which are completely independent of each other (neither is a parent of child of another). they're positioned (either absolutely or relatively) in a way that they overlap each other. when i assign an onmousemove event to them, only one of them catches...
4
4799
bakum
by: bakum | last post by:
Hi, i've got a basic layout as follows: One large table (height 100%) with two columns, left and right. Inside the left column are two divs#bottom #top. Inside the right column is one div#main. All div CONTENT is variable height, however I want div#main to always be 100% for layout purposes, hence I put a height:100% on it. #top + #bottom...
19
6182
roula
by: roula | last post by:
I HATE DIVS AND DIFFERENT BROWSERS!!! i spent the whole day and night searching for a way to center align stupid divs, the problem is that the code is so sensitive, i lost my mind trying to make them work in a certain way (like some should scroll with a fixed background and others shouldn't scroll bla bla..) and the divs are nested and positioned...
12
4664
by: daniel2335 | last post by:
This problem is everywhere! I have read all forums available, spent about 40+ hours on it and lost a bit of hair. I was going to explain what its ment to look like but I just realised removing the DocType makes it look like how I want it (with the div containing the ">" symbol the full length). But obviously I want this look with the DocType still...
2
2735
by: rigiditymodulus | last post by:
Hi - So, I had this working perfectly, then had a small crash (the transmitter for my wireless mouse occassionally freaks out my MacBook Pro) and when I rebooted and opened up my file the two layered DIVs I had were no longer showing up correctly. I had this going fine for several hours -- it wasn't a happy accident I forgot to save. I'm...
3
2036
jhardman
by: jhardman | last post by:
I'm almost to the point of using tables to position my elements. That is how bad this is. So here's the rundown. I have an old page (created by someone else) that I was trying to update to reasonable standards. It has a header bar across the top and a footer bar across the bottom. The rest of the page is divided into two columns, a side bar...
0
7715
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7956
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7469
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6040
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5368
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3498
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3480
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1935
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
757
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.