473,382 Members | 1,420 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.

offset not working as desired in FireFox

Hi,

I have developed script library for dispalying calendar for my web
pages.

To display calendar, i am using div tag and with in div tag, i am
defining the dates.

This div tag is wrapped by IFrame control, in order to make the div tag
overlap over 'select' controls.

These controls (both Div and IFrame) are dynamically generated and i am
setting the width of div tag based on my text box associated with the
calendar.

IFrame width is determined by Div tag's offsetWidth.

This calculation works properly in IE 6.0, but when it comes to Firefox
1.5.0, the offsetWidth has been calculated wrongly and my calendar
shrinks abnormally.

Can some body help me

Regards,

Pavan

May 23 '06 #1
1 1964
Pavan wrote:
This div tag is wrapped by IFrame control, in order to make the div
tag overlap over 'select' controls.
Not necessary. Instead, place an iframe _under_ the div. It works better.
IFrame width is determined by Div tag's offsetWidth.
This calculation works properly in IE 6.0, but when it comes to
Firefox
1.5.0, the offsetWidth has been calculated wrongly and my calendar
shrinks abnormally.


You are possibly seeing differences in box models.
Firefox uses the W3C "standard" box model.
IE uses this when in strict mode (by using an appropriate DOCTYPE),
otherwise it uses its own box model (which happens to make much more sense
than the W3C box model, but it's too late now...)
See http://www.quirksmode.org/css/quirksmode.html for info.

Offsetwidth should behave the same in both browsers, since it was invented
by MS and FF and other browsers simply copy the behavior. It should measure
from outside to outside, including borders and padding. So, the specifics of
your case depend on your exact html.

When asking for assistance on a specific problem, it is always best to show
the actual problem. Provide an example url. Or if that's not possible, at
least post problematic code here. Always minimize to the smallest possible
test case which still exhibits the problem - remove everything that isn't
necessary. The exercise of created a minimal test case is often enough to
make you realize what the root problem is and solve it yourself before
needing to ask :)

--
Matt Kruse
http://www.JavascriptToolbox.com
http://www.AjaxToolbox.com
May 23 '06 #2

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

Similar topics

2
by: Matt | last post by:
I use CSS for positionings in my html page, the problem is when i resize the browser, the positions are offset. Here's the code, any ideas?? <html> <head> <style type="text/css">
0
by: D. Dante Lorenso | last post by:
I need to know that original number of rows that WOULD have been returned by a SELECT statement if the LIMIT / OFFSET where not present in the statement. Is there a way to get this data from PG ?...
3
by: spleen | last post by:
Hiya, Im working on a project to read in a file (its a bitmap, but thats irrelevant) and I want to read in all the data after an offset, ive tried using - fread(bitmap_buffer, offset, 1, fp);...
2
by: adamjroth | last post by:
Hello, I'm having trouble with IE's Range/Selection objects: when a user click's anywhere in an element, can I create a range at that point exactly _AND_ get the character offset? The code...
10
by: jjamjatra | last post by:
I am struggling with a event model handling problem in Javascript that shows up only in Firefox. I have 2 little websites I'd like you to take a look at: ...
6
by: Raffi | last post by:
Hi, My web page has an iframe with a list of items from a database. These items are html links and when clicked they execute a server side script to update the database and reload the iframe...
3
by: Ritwik Kumar | last post by:
Hi, can you please help me sort out this problem..... a site http://www.kuliza.com/ open quite well if Internet explorer is used but if firefox is used display is not as desired.... wat could...
8
by: Thomas Mlynarczyk | last post by:
Hello, I want to split a given string into tokens which are defined by regexes: // example tokens - a bit more complex in real $tokens = array( 'NUMBER' ='~^\d+~', 'NAME' ='~^+~', 'ANY' ...
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: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
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...
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: 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...

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.