Web Development HTML Guide - Learn HTML
Developer Tutorials
ASP
CGI & Perl
CSS
Flash
HTML
Java
JavaScript
Linux
MySQL
PHP
Photoshop
Python
Wireless
XML



Developer Manuals
Learn HTML
Learn PHP
Learn MySQL
Learn CSS
Learn Pear


Developer Scripts
ASP Scripts
ASP.NET Scripts
CGI & Perl Scripts
Flash Scripts
Java Scripts
JavaScript Scripts
PHP Scripts
Python Scripts
Remotely Hosted Scripts
Tools & Utilities Scripts
XML Scripts

Developer Resources
Developer Tools
Developer News
Developer Forums
Developer Content
Developer Book Reviews
Survey Software

Web Hosting Directory
Budget Web Hosting
ColdFusion Hosting
Dedicated Servers
Domain Hosting
E-Commerce Hosting
Email Hosting
Free Web Hosting
Linux Web Hosting
Managed Hosting
Reseller Hosting
Small Business Hosting
Windows Web Hosting

Attribute for <APPLET ...>
ALIGN = LEFT | RIGHT | TOP | MIDDLE | BOTTOM | BASELINE

ALIGN sets the alignment of the applet relative to the text around it. ALIGN works much like <IMG ALIGN="...">

The values for ALIGN can be divided into two groups: LEFT and RIGHT, which put the applet on the left or right side of the page; and all the other values, which concern the vertical placement of an inline applet.

LEFT and RIGHT

LEFT and RIGHT put the applet on the left or right side of the page and cause the text to wrap around it:

this code produces this
<APPLET 
     CODE="MyApplet.class" 
     ALIGN=LEFT
     HEIGHT=50 WIDTH=50>
Come on down to our beautiful town! We'll show you a right good time and some tasty food to boot!
<APPLET 
     CODE="MyApplet.class" 
     ALIGN=RIGHT
     HEIGHT=50 WIDTH=50>
Come on down to our beautiful town! We'll show you a right good time and some tasty food to boot!

Text will continue to wrap around the applet until it gets past the applet, or until you use <BR CLEAR="..."> to cause text to skip down to after the applet:

this code produces this
<APPLET 
     CODE="MyApplet.class" 
     ALIGN=LEFT
     HEIGHT=150 WIDTH=50>
     <PARAM NAME=TEXT VALUE="Howdy!">
</APPLET>

Come on down to our beautiful town!<BR CLEAR=ALL>

We'll show you a right good 
time and some tasty food to boot!
Come on down to our beautiful town!
We'll show you a right good time and some tasty food to boot!

If the text looks crowded too close to the applet, you may want to check <APPLET HSPACE="..."> and <APPLET VSPACE="...">.

The Other Values

All other values for ALIGN define the vertical position of the applet to the surrounding text. With these other values, text does not wrap around the applet.

Default

This is to show how text behaves without ALIGN

this code produces this
<APPLET 
     CODE="MyApplet.class" 
     HEIGHT=50 WIDTH=50>
Xy

TOP

Aligns the top of the applet with the top of the text

this code produces this
<APPLET 
     CODE="MyApplet.class" 
     ALIGN=TOP
     HEIGHT=50 WIDTH=50>
Xy

MIDDLE

This value has particularly different results in different browsers. In some browsers, ALIGN aligns the middle of the text with the middle of the applet. In other, it aligns the bottom of the text with the middle of the applet

this code produces this
<APPLET 
     CODE="MyApplet.class" 
     ALIGN=MIDDLE
     HEIGHT=50 WIDTH=50>
X

BOTTOM

Aligns the bottom of the applet with the bottom of the text

this code produces this
<APPLET 
     CODE="MyApplet.class" 
     ALIGN=BOTTOM
     HEIGHT=75 WIDTH=75>
Xjy

BASELINE

ALIGN=BASELINE illustration Aligns the bottom of the applet with the baseline of the text. The baseline is the line along which the bottom of most letters rest, but below which some letters dangle, such as j and y.

this code produces this
<APPLET 
     CODE="MyApplet.class" 
     ALIGN=BASELINE
     HEIGHT=75 WIDTH=75>
Xjy


Copyright Idocs, Inc. Written by Miko Sullivan











About the NetVisits, Inc Network | Advertise
Developer Tutorials hosted by HostGator.
Copyright ©2007 NetVisits, Inc Network. All Rights Reserved. Privacy Policy.
Visit other NetVisits, Inc. sites: