473,395 Members | 1,456 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,395 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?

Oct 31 '07 #1
1 1759
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

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...
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...
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...
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...
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") {...
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...
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(' +...
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...
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...
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...
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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: 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...
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,...
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...
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.