Results 1 to 2 of 2

Thread: Give the Left, Right, Center alignment with CSS

  1. #1
    Join Date
    Dec 2009
    Posts
    23

    Give the Left, Right, Center alignment with CSS

    Use the following steps for give alignment to your web pages
    • Step 1
    For aligning the text within normal block of paragraph or a block quote then use text-align property.
    • Step 2
    Left, right and center aligned text
    Left, Right, Center, justify are property value of the test-align. Mostly use left, right and center alignment because on the web Justified alignment text is not good for looking,
    • Step 3
    Normally an element is assigned to an id or class. The text alignment of any items in that id or class is set with a rule such as one of these:

    #left {
    text-align: left;
    }
    #right {
    text-align: right;
    }
    #center {
    text-align: center;
    }
    How to Center Divs, Wrapper Divs and Body
    • Step 1
    For applying the center an entire layout then you has to use a different CSS technique.
    • Step 2
    For that you have to use CSS rule to the larger element selector you want centered.
    • Step 3
    Centering by this method does not affect text alignment. The centered element will retain the default left alignment of text within the centered element.
    • Step 4
    Use following code to use A centered layout
    body {
    width: 80%;
    margin-right: auto;
    margin-left: auto;
    border: 1px solid black;
    }

  2. #2
    Join Date
    Apr 2009
    Posts
    569

    Re: Give the Left, Right, Center alignment with CSS

    Thank you a lot for your tips. I am a beginner in web development and have just finished with my HTML tutorials and was stepping into the CSS. Your tips just came in time to rescue me. Your tips has proved to be very helpful to me and will surely prove helpful to many beginners like me. Looking forward to more tips and tricks related to this topic especially web development and making web pages. anyways once again thank you for your efforts.

Similar Threads

  1. Need suggestion on Alignment of Sky Satellite dishes
    By Ramiah in forum Technology & Internet
    Replies: 8
    Last Post: 29-03-2012, 02:28 AM
  2. I need some to generate code for text alignment
    By HamsiniI in forum Software Development
    Replies: 5
    Last Post: 15-06-2011, 12:55 AM
  3. Dell AIO 922 Automatic alignment issues
    By Haviva in forum Portable Devices
    Replies: 3
    Last Post: 07-12-2010, 05:53 AM
  4. Paragon Alignment Tool
    By Captain Carrot in forum Hardware Peripherals
    Replies: 6
    Last Post: 02-07-2010, 06:08 AM
  5. Video alignment in virtual dub
    By Enriquee in forum Windows Software
    Replies: 5
    Last Post: 03-02-2010, 12:07 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,999,337.36270 seconds with 17 queries