473,404 Members | 2,170 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,404 software developers and data experts.

Dynamically resize divs.....

Hi Everyone!

I am trying to resize a div based on screen size. I am using this

Expand|Select|Wrap|Line Numbers
  1. .Menu {
  2.     position:absolute;
  3.     background-color: #FFD600;
  4.     float:left;
  5.     top:0px;
  6.     left:0px;
  7.     height:100px;
  8.     width:100%;
  9.     width: expression(document.compatMode=='CSS1Compat'? (document.Menu.offsetWidth-81)+'px' : body.(offsetWidth-81)+'px');
  10. }
and it works fine in IE, but FF it covers up the div next to it....

Any ideas on this?

Thanks,
Jim
Oct 31 '07 #1
1 1760
drhowarddrfine
7,435 Expert 4TB
'expression' is non-standard and only works in IE and no other browser.
Oct 31 '07 #2

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

Similar topics

27
by: Nicholas Couch | last post by:
I have a little form with a couple of dynamically generated list boxes. When the user makes a selection from the first box, the second box is refreshed. When they make a selection from the second...
0
by: Rod Billett | last post by:
The included html contains 3 divs. One primary Div, with 2 nested divs. the second nested DIV contains an empty table. Problem 1: Phantom Space. When viewed within the browser, the div 'action...
6
by: JezB | last post by:
I need to code my own resize event, and Im not sure how. I have a DIV whose width I always want to be the browser height (the inner pane, excluding the toolbars, status bar etc) - 200 points...
1
by: bubba ho-tep | last post by:
Hello, When you have a datalist repeating horizontally, is it possible to set the repeatcolumns dynamically based on the user's window size? EG. If the user's window is wide enough for 3...
2
by: daveyand | last post by:
Hey Guys I am able to detect a window resize using the following code: window.onresize = function () { if(document.getElementById("parent_for_video").style.display != "none") {...
1
by: jonavanmona | last post by:
i've got a -maybe dumb- question since i've never had a single js lesson :) i want to catch some divs in a page, at first i got all the names of them from a db, but now they are dynamicly...
1
by: maya | last post by:
I'm using a function like this to load divs dynamically (and hide current one..) function get_img(curr_img,curr_nav,new_img,new_nav2) { var img_top = eval('document.getElementById(' +...
1
by: Starance | last post by:
Well... I'm not sure if this can be fixed, I've tried many ways. But here goes; When you resize your browser window it seems to move my video & photo divs. I want them kept in line with the...
10
by: =?Utf-8?B?UmljaA==?= | last post by:
A lot of users at my workplace use different screen resolutions, and I build apps to use 1680 x 1050 pixels res by default. But some users are using 800 x 600, and the apps are too large for their...
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
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...
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
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
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.