473,394 Members | 1,971 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,394 software developers and data experts.

100% vertically expanding div

clain
79
Do you guys know how to make a div expand vertically 100%..

i do have a solution with Javascript.. but its not the right way. any CSS tricks will be helpful..

also many such tricks works in IE just like giving 100% height to body..etc..

i need a FF and IE compatible one..

any wild guess.
Dec 18 '08 #1
7 7636
drhowarddrfine
7,435 Expert 4TB
@clain
No wild guesses. Just like you said, give the body and your div a height of 100%. Works every time.
Dec 18 '08 #2
clain
79
no buddy that one did not work in Firefox...!!!! its OK with IE....
Dec 18 '08 #3
KevinADC
4,059 Expert 2GB
can you show what you have tried, like:

Expand|Select|Wrap|Line Numbers
  1. <div style="height:100%;border:solid;">some content</div>
Dec 18 '08 #4
drhowarddrfine
7,435 Expert 4TB
Yes because I question what your other markup is. I use Firefox exclusively and that particular snippet I use frequently. Testing in my Windows notebook shows it works in IE and FF.
Dec 18 '08 #5
clain
79
Expand|Select|Wrap|Line Numbers
  1. <body style="height:100%;" >
  2. <center>
  3. <div class="bg">
  4.  
  5. some content
  6. </div>
  7. </center>
  8. </body>
  9.  
and here is the class bg

Expand|Select|Wrap|Line Numbers
  1. .bg
  2. {
  3. width:955px;
  4. background:url(../images/mainbg.gif) repeat-y; 
  5. height:100%;
  6. }
  7.  
Dec 18 '08 #6
drhowarddrfine
7,435 Expert 4TB
That should be working but I'm heading to the airport.
Dec 18 '08 #7
clain
79
do i have something to do with airport dude? ha ha .... anyway.... i'm just wandering and pondering with the problem
Dec 18 '08 #8

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

Similar topics

27
by: FL | last post by:
Hi Everyone, I know howto center a block using margin-left: auto ; margin-right: auto ; but I'm trying to center vertically a box, any idea to solve this?
10
by: john T | last post by:
Is there anyway to vertically center a html table using css in such a way it does not alter the html table. When I tryied it just screws up.
1
by: Bhiksha Raj | last post by:
Hi, I created an expanding menu on one of the frames in my webpage using code I got from http://www.dynamicdrive.com/dynamicindex1/navigate1.htm I have embedded the code (with minor...
3
by: Jörg Ellermann | last post by:
Hi, I'm quite unused to CSS and I want the following layout to work using CSS and tables: Page split into table with two cells of 50% width: Left cell | Right cell | Navbar ...
6
by: jslaybaugh | last post by:
I'm working on an ASP.NET 2.0 application and am having trouble with a very simple table layout. Using ASP.NET 2.0 it defaults to XHTML 1.0 Transitional and I am trying to comply. However, I...
1
by: Okie | last post by:
I'm trying to make a three panel page. Two panels on the left (top and bottom) and a content panel on the right. I want the viewport to never scroll. The left menu (two panels vertically) set at...
16
by: Tantale | last post by:
I used this serviec to check my webpage http://www.jmrw.com/Abroad/Barcelone/index.htm Made with Dreamweaver 8. The result is 206 errors, most of them "end tag omitted, but OMITTAG NO was...
16
by: Charles A. Landemaine | last post by:
I set a table with 100% width to occupy all available space, but in IE7 it uses more than that, it uses 100% of the page width instead of 100% of the table container. Could you test the page in IE7...
3
by: jerrygadd | last post by:
Hi can anyone please help? I have a need to make a table of fixed size, containing three rows, where the middle row auto expands to fill the remaining space between the top and bottom rows. ...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
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...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.