Closed Bug 85943 Opened 23 years ago Closed 23 years ago

image align bottom, middle does not work

Categories

(Core :: DOM: Core & HTML, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

VERIFIED DUPLICATE of bug 112276
Future

People

(Reporter: stummala, Assigned: jst)

References

()

Details

From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.1)
Gecko/20010607 Netscape6/6.1b1
BuildID:    2001-06-07-13-0.9.1

image align bottom, middle does not work.. i provided a simple testcase at that
given URL...
document.getElementsByTagName( "IMG" ).align="middle";
document.write ("<br>" + document.getElementsByTagName("IMG").align + "<br>");
document.getElementsByTagName("IMG").align="bottom";
document.write ( document.getElementsByTagName("IMG").align + "<br>");


this is what i was trying to do, works on IE....

Reproducible: Always
Steps to Reproduce:
1.load the url http://h-201-12-38-201/himg002.html
2.
3.

Actual Results:  undefined
undefined

Expected Results:  middle
bottom
Attaching the testcase to this bug instead of having it on a netscape-only site
would really help here.

The problem, I would guess, is that document.getElementsByTagName("IMG") is a
_list_ of image nodes and does not have an "align" property.  So the code you're
trying to use is not really valid.  Are there any errors about the property not
existing in the JS console?
my bad i changed it ....
here is the testcase..
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<BODY>

<IMG height="500" width="200" src="/images/bg.jpg" alt="mozilla lone star image.
" border=2>

<SCRIPT TYPE="text/javascript">
var aE = new Array();
aE=document.getElementsByTagName("IMG");
aE[0].align="middle";
document.write ("<br>" + aE[0].align + "<br>");
aE[0].align="bottom";
document.write ("<br>" + aE[0].align + "<br>");
</SCRIPT>
</BODY>
</HTML>

it prints as center and baseline .... 
I get the exact same problem using NT with 5.0 on composer! Image moves when you
use the space or back space key but not from the pref's after you double click
on image. It will wrap to the right and left though.
Future.
Target Milestone: --- → Future
I didn't know about this bug, and was working on the problem for one of my bugs,
so it seems simplest to dup to 112276

*** This bug has been marked as a duplicate of 112276 ***
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
The problem is with bottom vs baseline also.
I will add this comment in the bug 112276
bug 112276 has been fixed. marking verified
Status: RESOLVED → VERIFIED
Component: DOM: HTML → DOM: Core & HTML
QA Contact: stummala → general
You need to log in before you can comment on or make changes to this bug.