473,382 Members | 1,238 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

frame size issue

35
how can i make a div tag fill all the area inside body tag while its empty
ie.
[HTML]<body>
<div id="wrapper">
</div>
</body>[/HTML]

i'm putting this inside a frame, which i want it to be of fixed size because if i put a table inside the div and mangle with its size , the frame gets out of bound while i want it to be of fixed layout no matter what's inside it.
Sep 26 '07 #1
6 2691
You will need to do it with CSS, so in the HTML file, you have:
Expand|Select|Wrap|Line Numbers
  1. <body>
  2. <div id="wrapper">
  3. </div>
  4. </body>
  5.  
Then make a CSS file, or add this to your existing one:
Expand|Select|Wrap|Line Numbers
  1. #wrapper {
  2. width:100%;
  3. height:100%;
  4. }
  5.  
Sep 26 '07 #2
r_o
35
Expand|Select|Wrap|Line Numbers
  1. #wrapper {
  2. width:100%;
  3. height:100%;
  4. }
  5.  
i have tried this and it's not working in both browsers (IE7 and FF 2).the div is like never displayed. since this is inside a frame, i also need that if an element is too large the frame would not overflow but rather become scrollable and its height always fixed.Any suggestions to achieve that ?
thanks
Sep 26 '07 #3
Is the frame an IFrame, and could you possibly post the code your having trouble with?
Sep 26 '07 #4
r_o
35
Is the frame an IFrame, and could you possibly post the code your having trouble with?
sure

[HTML]<frameset rows="16%,4*,*" frameborder="no" border="0" framespacing="0">
<frame src="top.html" name="topFrame" scrolling="no" noresize="noresize" id="topFrame" title="topFrame" marginheight="0" marginwidth="0"/>
<frame src="main.html" name="mainFrame" id="mainFrame" noresize="noresize" title="mainFrame"/>
<frame src="bottom.html" name="bottomFrame" scrolling="no" noresize="noresize" id="bottomFrame" title="bottomFrame" marginheight="0" marginwidth="0" />[/HTML]

problem is with main frame,

[HTML]#wrapper{
margin-left:auto;
margin-right:auto;
margin-bottom:0px;
margin-top:0px;
padding:0px 0px 0px 0px;
width:800px;
height:100%;
display:block;
}
-->
</style>
</head>

<body>
<div id="wrapper">

</div>
</body>
</html>[/HTML]

the div does not take up space inside the frame, and if i put a table inside it, at a certain point of increasing the height of the table, the div just goes out of bound
Sep 26 '07 #5
I'm still not 100% sure about the problem you have because with your code, the div is there in the frame and you can place anything in it and it doesn't disappear.
About the overflow thing, you can try different things to see what you are after.
Here they are:
Expand|Select|Wrap|Line Numbers
  1. overflow:scroll;
  2. overflow:hidden;
  3. overflow:visible;
  4. overflow:auto;
  5. overflow:inherit;
  6.  
And you said you wanted the div to take up all the space, then you should have both the height and width set to 100%.
Sorry I couldn't be of much help
Sep 26 '07 #6
r_o
35
I'm still not 100% sure about the problem you have because with your code, the div is there in the frame and you can place anything in it and it doesn't disappear.
About the overflow thing, you can try different things to see what you are after.
Here they are:
Expand|Select|Wrap|Line Numbers
  1. overflow:scroll;
  2. overflow:hidden;
  3. overflow:visible;
  4. overflow:auto;
  5. overflow:inherit;
  6.  
And you said you wanted the div to take up all the space, then you should have both the height and width set to 100%.
Sorry I couldn't be of much help

yeah for now the div is empty.No matter weither the div is empty or not, i want it to be uniformly displayed, even if the elements inside it are "big" enough to overflow so it would always occupy the same size.
Sep 26 '07 #7

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

Similar topics

7
by: xmp333 | last post by:
Hi, I know the noresize attribute will keep the user from resizing a frame, but is there a way to keep a frame from being resized by the browser (in response to things like different...
2
by: RWD | last post by:
I am trying to figure out how to change the target frame in my hyperlink on a DHTML menu. The menu is in one frame and the target frame is called "main" The code is below: Thanks in advance...
0
by: Lyn | last post by:
I am having a frustrating time trying to do a simple insert of a BMP picture into a Bound Object Frame using both VBA and the Insert | Object... dialog. I had a separate post thread going on this...
1
by: Wim | last post by:
Hi Everyone, I'm trying to speed up a Asp.net 1.1 applications' performance. The application needs to run in an environment with little bandwith and therefore pagesizes and roundtrip times shoud...
5
by: Martin Chen | last post by:
I have a frame set (as per MS FrontPage 2000). It has a contents and a main frame. The contents frame has a menu bar written with with javascript (in the context of a table). In IE6.1 everything...
4
by: sumitha | last post by:
Hi I am using wxpython to develop my GUI. I have 3 frame. On the first frame I have ok button and when I click that it will open 2nd frame. And when I click ok button on 2nd frame, it will open 3rd...
2
by: Abneo | last post by:
Hi all, I am very new to Javascript and I am in some need of some help. I am creating a site that has a madlib. I got the madlib code but now I want the results of the madlib to display in...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.