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

Macromedia's css dynamic repositioning does not work in Netscape

Kor
Hi,

Does anybody understand why the technique described in
http://www.macromedia.com/devnet/ser...sitioning.html

doesnt work in Netscape 6/7 and Mozilla? I tried it out but to no
avail. I am certainly not a (javascript) programmer / DOM expert but
it seems to me it should work (see for example
http://www.quirksmode.org/dom/w3c_html.html )

I hope somebody can help,

cheers,
Kor
Jul 23 '05 #1
6 1538
Kor wrote:

Hi,

Does anybody understand why the technique described in
http://www.macromedia.com/devnet/ser...sitioning.html

doesnt work in Netscape 6/7 and Mozilla? I tried it out but to no
avail. I am certainly not a (javascript) programmer / DOM expert but
it seems to me it should work (see for example
http://www.quirksmode.org/dom/w3c_html.html )

I hope somebody can help,

cheers,
Kor

Kor,

After a quick look, my first intuition is that the reason it won't (and
shouldn't) work is that they assign block specific styles to an inline
element.
A <DIV> is a block level element, i.e. has a box and can be positioned.
A <SPAN> is an inline element and should be represented *inline*, i.e.
not in a box and therefore *shouldn't* accept positioning.

A quick and dirty solution would be the add:
display: block;
to the css definitions which are used by the span (the .position# ones)
or for the same effect with less code:
#bomb {
display: block;
}
this is how you make the <SPAN> with ID="bomb" behave like a block
element.

The better solution would of course be to dissect the page and code it
properly, but well.. that would mean a rewrite of the article.
Macromedia is of course welcome to contact me for that (including pay).

Grz, Juliette
Jul 23 '05 #2
DU
Kor wrote:
Hi,

Does anybody understand why the technique described in
http://www.macromedia.com/devnet/ser...sitioning.html

doesnt work in Netscape 6/7 and Mozilla? I tried it out but to no
avail. I am certainly not a (javascript) programmer / DOM expert but
it seems to me it should work (see for example
http://www.quirksmode.org/dom/w3c_html.html )

I hope somebody can help,

cheers,
Kor

"
Stricter Style Sheet Parsing
(...)
When you use the !DOCTYPE declaration to switch on standards-compliant
mode, Internet Explorer 6 or later ignores style sheet declarations that
do not comply with CSS1.
(...)
Missing Unit Type Identifiers Treated as Pixel Values
According to CSS1, length values must specify a unit type identifier,
such as cm, mm, in, pt, pc, or px. Values without unit type identifiers
and values with white space between the number and the unit type
identifier are ignored. Earlier versions of Internet Explorer treat
numbers without any unit type identifier as pixel units—as if "px" were
appended to the string.
"
CSS Enhancements in Internet Explorer 6, March 2001
http://msdn.microsoft.com/library/en...hancements.asp

If the author of that DW document would have added a doctype decl.
triggering standards compliant rendering mode in MSIE 6, then the
resulting rendering would have been the same as with Mozilla and NS 7.1.
A simple CSS validation of that file (link broken to avoid causing
scrolling)

http://jigsaw.w3.org/css-validator/v...warning=2&uri=
http%3A//www.macromedia.com/devnet/server_archive/articles/css_positioning_dynamic_repositioning.html

will report the (error) space between the value and the unit (width: 35
px). CSS1 and CSS2 indicate how user agents should handle such error.

"User agents must ignore a declaration with an illegal value. For example:
(...)
IMG { border-width: 3 } /* a unit must be specified for length values */
"
CSS2
4.2 Rules for handling parsing errors
http://www.w3.org/TR/CSS2/syndata.html#parsing-errors

The bottom line is this: Mozilla and NS 7.x rendered correctly that
page. Had the page included a doctype decl. indicating, say, a strict
definition, then MSIE 6 would have handled/rendered it correctly.

DU
Jul 23 '05 #3
Kor
Thanks Juliette and DU,

I implemented it on the site I am working on, which validates as
STRICT as DU says. I added the {display: block} as Juliette suggested.
But still it doesnt work in Netsc/Moz. If you feel like it, you might
have a look, I would appreciate. The relevant css-code and scripting
is in the top of the documents.

site
http://www.martienmulder.com
(hover over the links and "under construction" will pop up.

scripting:
http://www.martienmulder.com/script.js

css:
http://www.martienmulder.com/martien.css
sources I used:
for repositioning:
http://www.macromedia.com/devnet/ser...sitioning.html

image gallery:
http://www.alistapart.com/articles/imagegallery

Thanks! Kor
Jul 23 '05 #4
Kor wrote:

Thanks Juliette and DU,

I implemented it on the site I am working on, which validates as
STRICT as DU says. I added the {display: block} as Juliette suggested.
But still it doesnt work in Netsc/Moz. If you feel like it, you might
have a look, I would appreciate. The relevant css-code and scripting
is in the top of the documents.

site
http://www.martienmulder.com
(hover over the links and "under construction" will pop up.

scripting:
http://www.martienmulder.com/script.js

css:
http://www.martienmulder.com/martien.css

sources I used:
for repositioning:
http://www.macromedia.com/devnet/ser...sitioning.html

image gallery:
http://www.alistapart.com/articles/imagegallery

Thanks! Kor

Kor,

I had a quick look at it, but haven't got the time now to do the needed
rewrite.
One of the things which comes to mind as a possible source of the
problem, is that you use "bottom: ##px" as part of the positioning.
As far as I know, the bottom property isn't fully supported by all
browsers, so that may be the problem.
You could try to replace it with: "top: -xxpx;"

Juliette
Jul 23 '05 #5
Kor
Hi Juliette,

I tried it out (and had to change it back to "bottom") but no effect,
still no repositioning in Netsc/Moz. Weird isn't it. Can you maybe
point me in a direction to how to reposition this in a different way,
using javascript and css?

cheers, Kor
Jul 23 '05 #6
Kor
Hi Juliette,

I tried it out (and had to change it back to "bottom") but no effect,
still no repositioning in Netsc/Moz. Weird isn't it. Can you maybe
point me in a direction to how to reposition this in a different way,
using javascript and css?

cheers, Kor
Jul 23 '05 #7

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

Similar topics

0
by: Supernews | last post by:
I work for Macromedia and we are looking to form advisory groups to better understand the needs of developers and inform future product development. Those participating will have direct contact...
0
by: Supernews | last post by:
I work for Macromedia and we are looking to form advisory groups to better understand the needs of developers and inform future product development. Those participating will have direct contact...
2
by: Joe Kelsey | last post by:
I want to create dynamic content and use replaceChild to switch out different subtrees. I start with a span placeholder: <span id="replaceMe"></span> Then I use document.getElementById...
5
by: cedawe | last post by:
I have two select boxes. When the user picks a value in the first one it completely re-populates the second one. It works fine, but only generates a standard OPTIONS list and I now want to group...
2
by: Templar | last post by:
Hi i'm bothering with such problem... I must dynamic create an Iframe, and then put som raw HTML into it. But I can't. When I create iframe, I can't access its properties. Here's the coe...
13
by: mr_burns | last post by:
hi, is it possible to change the contents of a combo box when the contents of another are changed. for example, if i had a combo box called garments containing shirts, trousers and hats, when...
3
by: daveland | last post by:
I am working on some JavaScript that dynamically adds rows to a table in response to a button click. A new row does appear on the screen when the button is clicked. However, that table to which a...
1
by: Mike George | last post by:
I am having a problem with dynamic validation controls. I have some code that uses an XSLT to transform an XMLDocument into HTML which creates ASP.NET validation controls dynamically (v 1.1). ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
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
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...
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.