Setting Right Margin

Discussion in 'HTML' started by Fred, May 23, 2006.

  1. Fred

    Fred Guest

    I'm looking for a straight forward way to set the right margin -- similar
    to using <DIR> for the left margin.
     
    Fred, May 23, 2006
    #1
    1. Advertising

  2. Fred

    Mark Parnell Guest

    Deciding to do something for the good of humanity, Fred
    <> declared in
    alt.html,alt.html.editors.webedit,alt.html.editors:

    [f'ups to alt.html, alt.html.editors removed as it doesn't exist on my
    server]
    > I'm looking for a straight forward way to set the right margin


    margin-right

    --
    Mark Parnell
    My Usenet is improved; yours could be too:
    http://blinkynet.net/comp/uip5.html
     
    Mark Parnell, May 23, 2006
    #2
    1. Advertising

  3. Fred <> scripsit:

    > 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.
     
    Jukka K. Korpela, May 23, 2006
    #3
  4. Fred

    Fred Guest

    I'm looking for a straight forward way to set the right margin -- similar
    to using <DIR> for the left margin.
     
    Fred, Jun 8, 2006
    #4
  5. Fred

    Mark Parnell Guest

    Deciding to do something for the good of humanity, Fred
    <> declared in
    alt.html,alt.html.editors.webedit,alt.html.editors:

    > I'm looking for a straight forward way to set the right margin


    The answers haven't changed in the last 2 weeks.

    --
    Mark Parnell
    My Usenet is improved; yours could be too:
    http://blinkynet.net/comp/uip5.html
     
    Mark Parnell, Jun 8, 2006
    #5
  6. Fred

    Fred Guest

    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

    "Jukka K. Korpela" <> wrote

    > 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, Jun 8, 2006
    #6
  7. Fred

    Fred Guest

    "Mark Parnell" <> wrote

    > The answers haven't changed in the last 2 weeks.


    I know, that's why I'm still asking. Still waiting for someone who
    understands the question.
     
    Fred, Jun 8, 2006
    #7
  8. Fred

    Neredbojias Guest

    To further the education of mankind, "Fred"
    <> vouchsafed:

    > 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.
     
    Neredbojias, Jun 8, 2006
    #8
  9. Fred wrote:
    > 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
     
    Jonathan N. Little, Jun 8, 2006
    #9
  10. Fred

    Chaddy2222 Guest

    Jonathan N. Little wrote:
    > Fred wrote:
    > > 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>

    That looks good.
    By the way my new design is now complete, well at the moment it is
    anyway, http://freewebdesign.cjb.cc
    But, I will say though that setting margens and padding seams to be one
    of the harder things to get right, both in CSS and web design
    generally.
    Oh on the subject of padding, to the op, you may need to set that as
    well.
    Depends on the look that you are going for though.
    --
    Regards Chad.
    Free web design for community groups and organisations!
    http://freewebdesign.cjb.cc/more-info.html
     
    Chaddy2222, Jun 8, 2006
    #10
  11. Fred

    Fred Guest

    I'm looking for a straight forward way to set the right margin -- similar
    to using <DIR> for the left margin.
     
    Fred, Jun 13, 2006
    #11
  12. Fred

    Fred Guest

    Many thanks, Jonathan!! That's a great help to me.
    Sorry, I missed your post and didn't thank you earlier.

    "Jonathan N. Little" <> wrote in message
    news:87e27$4488130e$40cba7bf$...
    > Fred wrote:
    > > 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, Jun 13, 2006
    #12
  13. Fred

    Fred Guest

    Re: Setting Right Margin *** Thanks, Jonathan!!

    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

    "Jonathan N. Little" <> wrote in message
    news:87e27$4488130e$40cba7bf$...
    > Fred wrote:
    > > 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, Jun 13, 2006
    #13
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. chlori

    margin-right in IE6

    chlori, Jul 11, 2003, in forum: HTML
    Replies:
    2
    Views:
    3,585
  2. Cogito

    Making a margin on the right

    Cogito, May 31, 2004, in forum: HTML
    Replies:
    20
    Views:
    852
  3. OAM
    Replies:
    1
    Views:
    498
    Breklin
    Oct 24, 2006
  4. Cal Who
    Replies:
    1
    Views:
    434
    Alexey Smirnov
    May 16, 2010
  5. Cal Who
    Replies:
    4
    Views:
    580
    Cal Who
    May 17, 2010
Loading...

Share This Page