Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7641453
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T08:55:38+00:00 2026-05-31T08:55:38+00:00

Is there any code or tag which can be used to centralise any HTML

  • 0

Is there any code or tag which can be used to centralise any HTML element? The only way I know to do this currently is to repeatedly adjust padding and margins (left) to push elements to an approximate centred position. I’m aware you can centralise text, but this doesn’t appear to work for other elements such as divs, objects, etc.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T08:55:39+00:00Added an answer on May 31, 2026 at 8:55 am

    To make the content center of the page try to use

    body{ margin:0 auto;}
    

    to align text center use

    p{text-align:center} or div p{text-align:center;}
    

    By using HTML tag for text

    <center>your text goes here</center>
    

    you can create a class on which you can write your css like

    <div class="align-center">Your text goes here</div>
    .align-center { text-align:center; } or .align-center { margin:0 auto; }
    

    so many ways are present to make the element center, its totally depends on you what layout you are creating and what kind of element you want to make center. Generally by using css we can make our elements center or as per our requirement. If you have any peculiar situation then ask.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Are there any good code profilers/analyzers for Erlang? I need something that can build
I have used this script which i found in the official simple html dom
There's precious little documentation about the declare-styleable tag by which we can declare custom
Is there any code coverage tool available for PHP? I wish to check the
Are there any Code Generators that would take a well-formed XML document, and write
Is there any code or custom options available to achieve the following : 1>
Is there any code example teaching how to zoom in and out in a
I need a simple app to edit database tables. Are there any code generators
Is there any existing code in Apache HttpClient or in the servlet API to
Are there any source code sharing system that lets you check in/out code on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.