I agree completely with Sebastian. You can pick up a comprehensive book on CSS
for about $50 in a bookstore (in my mind, there's still a place for a good
reference book), and there are plenty of sites around that show how it's done. I
googled CSS CLEAR RIGHT and came up with this immediately:
http://css.maxdesign.com.au/floatutorial/
For items like a single applet, you don't even need a classname. If you have
just one and the applet itself has an id= tag, probably "id=JmolApplet0", you
can just use that id in the style block with a number sign instead of a period as:
<style>
#JmolApplet0 {float:right; margin: 0 0 10px 10px}
</style>
Once you start using styles, you'll never go back.
Also, I do a lot of this by having a JavaScript function actually write the
style block to the page using document.write(). That way I can adjust the
numbers and names and such on the fly, as needed. Or, put the styles in a
separate file such as "styles.css" and load that on the fly as:
<head>
<link rel="stylesheet" type="text/css" href="styles.css">
</head>
This is nice because it separates the styles completely from the content.
The one caveat, of course, is that browser compatibility is an issue. We worked
pretty hard this summer on http://fusion.stolaf.edu/gca to get this looking
right in a wide range of (never say "all") browsers. But what's new? The main
thing to know is that Microsoft went wild on CSS a few years ago and implemented
hundreds of mostly arcane styles that never caught on. But the interesting thing
is that now if you save a Word document as HTML it's ALL there, and Word can
pick it up and run with it just as though it were in DOC format.
Bob
Sebastian Lisken wrote:
To right-align text within a DIV, use "text-align: right".
To put a DIV (or applet) to the right of the "column" and have your text
float around it, use "float: right". You can use a <br clear="right">
or, better, an HTML element styled with "clear: right" to get "below"
the right-shifted box.
CSS really is the way forward, you know. You should make that learning
investment. Give your applets or the containing DIVs classes, don't use
"style=". you can hold your class definitions in the same file for
testing but as soon as you develop more than one page, keeping your CSS
file separate will make things so much easier. Make class names that
have meaning - you can literally create "classes" of HTML elements that
need the same kind of treatment.
For an awe-inspiring look at what can be done with CSS, see the CSS Zen
Garden, "http://www.csszengarden.com/". The same HTML (raw form:
"http://www.csszengarden.com/?cssfile=none") is made to look
dramatically different using only CSS and (large amounts of) images
referenced by the various CSS contributions (not the HTML). Click
through some of the designs for relaxation. :-)
Sebastian Lisken
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users
--
Robert M. Hanson, [EMAIL PROTECTED], 507-646-3107
Professor of Chemistry, St. Olaf College 1520 St. Olaf Ave., Northfield, MN
55057
mailto:[EMAIL PROTECTED] http://www.stolaf.edu/people/hansonr
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users