Results 1 to 6 of 6

Thread: Text Alignment in the central part of website

  1. #1
    Join Date
    May 2009
    Posts
    1,084

    Text Alignment in the central part of website

    Hi,
    I have small website which defines the notice board information. I update that weekly. The issue is that I am facing problem in text alignment of the site. I have a text which I want to put in the middle. But that does not work properly here. I text get non aligned in many cases. After changing the coding too. The same issue also occurs in older version of browsers also.

  2. #2
    Join Date
    Apr 2008
    Posts
    1,948

    Re: Text Alignment in the central part of website

    Here is the steps by which you can center elements inline horizontally. You want to center an element horizontally type online within a block. The CSS property text-align is intended to apply on a block element (container) and control alignment (left, right, centered, justified) of all elements of type in-line contained in this block container. This is exactly what we need. the sample syntax for that can be <div align=center> </div>

  3. #3
    Join Date
    May 2008
    Posts
    2,012

    Re: Text Alignment in the central part of website

    To center an element horizontally (block, tag or an entire website) in CSS, just give a width (width) to the element and the values auto side margins. For example <div id=global></div>. This can be the most simplest way of doing this. Once done you can refresh back your page to check it. If still the problem arises then do some changes in the coding.

  4. #4
    Join Date
    Apr 2008
    Posts
    2,005

    Re: Text Alignment in the central part of website

    The versions of Internet Explorer less than IE6 does not understand this logic and syntax for these versions. For this to work in IE5, it must align the text so centered in the body. Like for IE misinterprets this property and uses it to align everything: text, but pictures and all the elements in general. In fact, if your container is placed in the flow (with margins) and your content is positioned (absolute or relative), it exits the flow and thus the container. He then placed over the previous parent set the document.

  5. #5
    Join Date
    May 2008
    Posts
    2,297

    Re: Text Alignment in the central part of website

    Be careful not to forget to define a width for the element in focus, otherwise it can not logically be centered (it will occupy the full width available, as all the blocks by default). This method of automatic margins will not center a block if it is absolutely positioned. This is an important aspect for the same.

  6. #6
    Join Date
    Oct 2005
    Posts
    2,393

    Re: Text Alignment in the central part of website

    Take care not to forget the doctype , otherwise your page is other mode. In this mode, Internet Explorer behaves as versions prior to IE6, which means it does not interpret the dimensions and margins as it should. In this case, it would not implement the balance using the automatic margins. Cases positioned elements.

Similar Threads

  1. Some part of a website not compatible with Opera 11.60 Beta
    By Kumar esan in forum Technology & Internet
    Replies: 7
    Last Post: 12-11-2011, 10:58 PM
  2. Replies: 5
    Last Post: 18-07-2011, 07:48 PM
  3. 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
  4. Text alignment issue in HTC Desire Z
    By Ekhattar in forum Portable Devices
    Replies: 5
    Last Post: 29-01-2011, 10:05 PM
  5. Replies: 5
    Last Post: 02-12-2008, 08:30 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,711,616,921.64412 seconds with 17 queries