Discussion:
Setting Right Margin
(too old to reply)
Fred
2006-05-22 23:32:15 UTC
Permalink
I'm looking for a straight forward way to set the right margin -- similar
to using <DIR> for the left margin.
Jukka K. Korpela
2006-05-23 06:49:51 UTC
Permalink
Post by Fred
I'm looking for a straight forward way to set the right margin --
similar to using <DIR> for the left margin.
Someone still uses <DIR>? Vow! Someone still has faith in this invention
that has long been frowned upon browser vendors and web page authors alike,
abjured and depreciated by the World Wide Web Consortium and other powers,
etc. etc. Most of us mortals have long ago decided - if we ever considered
using <DIR> in the rare cases where we would like to use a directory-like
list of items - to use <UL> together with some rocket-science level CSS such
as ul { list-style-type: none; }.

In that case, try <DIR DIR="RTL">. It may have some side effects, though.

Follow-ups randomized as usual. "The average usefulness of a thread is
inversely
proportional to the cube of the number of groups it is posted to."

Note to newbies: The above message may contain some irony. Here's the boring
part: Don't use <DIR>. Use e.g. <div class="note">...</div> instead (or
attach class="note" to some existing or some more semantic element that you
wish to indent) and use a CSS rule like .note { margin-left: 1em; }. To set
right margin, use margin-right instead of margin-left.
Fred
2006-06-08 07:34:42 UTC
Permalink
Thanks, Jukka!! Unfortunately, I am sub-newbie.... sub-sub-newbie to be
exact...... which translates to .... I don't know what the heck "note" (in
<div class="note">...</div>) means.

Can you give me an example? See how the text in this message is 1/8-inch
never touches the left or right margin? Exactly how do you code a page to
give the same margin?

Your buddy,
Fred
Post by Jukka K. Korpela
Note to newbies: The above message may contain some irony. Here's the boring
part: Don't use <DIR>. Use e.g. <div class="note">...</div> instead (or
attach class="note" to some existing or some more semantic element that you
wish to indent) and use a CSS rule like .note { margin-left: 1em; }. To set
right margin, use margin-right instead of margin-left.
unknown
2006-06-08 10:59:57 UTC
Permalink
To further the education of mankind, "Fred"
Post by Fred
Thanks, Jukka!! Unfortunately, I am sub-newbie.... sub-sub-newbie to
be exact...... which translates to .... I don't know what the heck
"note" (in <div class="note">...</div>) means.
...And if you are as incapable of finding out as it seems, you might as
well give up now and save yourself some frustration.
--
Neredbojias
Infinity has its limits.
Jonathan N. Little
2006-06-08 12:08:23 UTC
Permalink
Post by Fred
Thanks, Jukka!! Unfortunately, I am sub-newbie.... sub-sub-newbie to be
exact...... which translates to .... I don't know what the heck "note" (in
<div class="note">...</div>) means.
Can you give me an example? See how the text in this message is 1/8-inch
never touches the left or right margin? Exactly how do you code a page to
give the same margin?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Your Title</title>

<style type="text/css">
BODY { margin-right: 2em; }
</style>
</head>
<body>
<p>Now the whole document well have a right margin of about 2 'M'
character widths adjust as desired</p>
</body>
</html>
--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Fred
2006-06-13 18:44:38 UTC
Permalink
Many thanks, Jonathan!! That's a great help to me.
Sorry, I missed your post and didn't thank you earlier.
Post by Jonathan N. Little
Post by Fred
Thanks, Jukka!! Unfortunately, I am sub-newbie.... sub-sub-newbie to be
exact...... which translates to .... I don't know what the heck "note" (in
<div class="note">...</div>) means.
Can you give me an example? See how the text in this message is 1/8-inch
never touches the left or right margin? Exactly how do you code a page to
give the same margin?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Your Title</title>
<style type="text/css">
BODY { margin-right: 2em; }
</style>
</head>
<body>
<p>Now the whole document well have a right margin of about 2 'M'
character widths adjust as desired</p>
</body>
</html>
--
Take care,
Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Fred
2006-06-13 19:07:32 UTC
Permalink
I just wanted to thank you again, Jonathan. Such a simple way to set the
right margin and you have explained it in such an easy-to-follow way that
even a beginner like me can do it!

Many thanks!

Fred
Post by Jonathan N. Little
Post by Fred
Thanks, Jukka!! Unfortunately, I am sub-newbie.... sub-sub-newbie to be
exact...... which translates to .... I don't know what the heck "note" (in
<div class="note">...</div>) means.
Can you give me an example? See how the text in this message is 1/8-inch
never touches the left or right margin? Exactly how do you code a page to
give the same margin?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Your Title</title>
<style type="text/css">
BODY { margin-right: 2em; }
</style>
</head>
<body>
<p>Now the whole document well have a right margin of about 2 'M'
character widths adjust as desired</p>
</body>
</html>
--
Take care,
Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Fred
2006-06-08 07:19:57 UTC
Permalink
I'm looking for a straight forward way to set the right margin -- similar
to using <DIR> for the left margin.
Fred
2006-06-13 18:43:02 UTC
Permalink
I'm looking for a straight forward way to set the right margin -- similar
to using <DIR> for the left margin.
Loading...