www.webdeveloper.com
Results 1 to 2 of 2

Thread: How to 'indent' left and right side of section

  1. #1
    Join Date
    Jul 2003
    Location
    Louisiana
    Posts
    326

    How to 'indent' left and right side of section

    What is best way to do this?

    First, is the TT tag okay to use still? So it will show the section in mono-spaced font?

    I want a section in a page that is TT and I want it to have a left and right margin of same size. So it stands apart some from the rest of the text around it. How?

    I also seem to remember I did something like this one time and put a 1px box around it. If anyone knows how... advise. Thanks.

    EDIT: I found an old web page I did way back:

    Code:
    <style type="text/css">
      body { margin-left: 10%; margin-right: 10%; font-family: Verdana, sans-serif; } h1,h2 { font-family: Garamond, "Times New Roman", serif; }
      body { color: black; background: lightblue; }
      div.box { border: solid; border-width: thin; width: 100%; background: rgb(204,204,255); padding-left: 1em; padding-top: 1em; padding-right: 1em; padding-bottom: 1em }
    </style>
    This works but if there are errors or a better way, advise, please.
    Last edited by Duke Will; 08-18-2005 at 01:25 PM.

  2. #2
    Join Date
    Nov 2002
    Posts
    2,632
    <style type="text/css">
    body { margin: 0 10%; font-family: Verdana, sans-serif; color: black; background: lightblue; }
    h1, h2 { font-family: Garamond, "Times New Roman", serif; }
    div.box { border: 1px solid #000; width: 100%; background: rgb(204,204,255); padding: 1em; }
    </style>

    I largely did the shorthand version for some of the things. For future reference, this really needs to go into the CSS section of the forum.
    Last edited by spufi; 08-18-2005 at 02:52 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles