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

Full screen div, width + height

Hi,

How can I make a div to be 100% width and height of my window? I know
with CSS I can make the width work with width:100%, however that
doesn't work for the height. Maybe I need to use javascript to get the
height of the window....?

What I'm trying to do is make the div cover the whole window with a 50%
transparent layer. I already have the transparency working, but I can
get the height to cover the whole window, how can I do this?

Dec 15 '06 #1
1 2448
Ivo
<eg****@gmail.comschreef
How can I make a div to be 100% width and height of my window? I know
with CSS I can make the width work with width:100%, however that
doesn't work for the height. Maybe I need to use javascript to get the
height of the window....?
Add body{height:100%} as a first rule to combat what has been called an
IE-bug.
Or post an url or smaple code.

Cheers,
chicken4?
Dec 15 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Paul | last post by:
Try making a .html file with only this inside: <script> op=window.createPopup(); op.document.body.innerHTML="">"; op.show(0,0,screen.width,screen.height,document.body); </script> As you it...
2
by: Larry R Harrison Jr | last post by:
I have pull-down menus in javascript and I have the code for opening a link in a new window. But I want it to open a full-sized window. I can't figure out the syntax. What I have so far: ...
9
by: pow67 | last post by:
Is there a javascript statement which can be incorporated in a hyperlink which will open a new page that fills the screen while leaving the page with the link open? Thanks in advance. CW
6
by: Tony Liu | last post by:
Hi, when switched to the full screen mode in VS.NET IDE, is there any way to hide the main menu bar? Thanks Tony
18
by: DavidS | last post by:
Have resW=screen.width; resH=screen.height in javascript. How can I read these values in ASP.NET source code - Page_Load function of code behind? Any suggestions?
1
by: Angus Lepper | last post by:
I'm writing a stock ticker for a stock market simulation, and can load the data into the xmlreader in the first place, but can't figure out how to refresh/update the data in it. Any ideas? Code:...
15
by: iwdu15 | last post by:
hi, is there anyway i can make my windows form to be full screen? thanks
6
by: wiewel | last post by:
hi all, i have a strange problem when trying to set up a horizontal menubar: i would like to split the whole screen from left to right into 9 pieces. the first one has a fixed width of 186px....
6
by: hdsk | last post by:
hi everybody, this is my first time posting something. And I'm sorry because my english is far from perfect. I'm trying to make a fullscreen transparent div but I have some restrictions on the way...
3
dmjpro
by: dmjpro | last post by:
I am using this JavaScript code to open a window in a full screen mode .... var styles =...
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: 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?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...
0
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,...

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.