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 7676181
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T17:08:27+00:00 2026-05-31T17:08:27+00:00

I have some experience with Java , C , databases , networking etc..But anything

  • 0

I have some experience with Java , C , databases , networking etc..But anything related with Html I am a begginer.The only thing that I am looking for is to center two words in the middle of the page(This page will have only those two words).

                                WORD1
                          WORDWORDWORDWORD2

I have tried some WYSIWYG software like KompoZer, but when I looked to the source code, it had generated a horrible static code with a lot of <br> to achieve the vertically center of the page.Anybody could help me finding a good solution to this problem

  • 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-31T17:08:29+00:00Added an answer on May 31, 2026 at 5:08 pm

    Centering horizontally is easy – centering vertically is a bit tricky in css as it’s not really supported (besides table cells <td>, which is bad style for layouting unless a table is really needed as – well – a table). But you can use semantically correct html tags and apply table display properties to it.

    That’s one possible solution – there are many approaches, here is a good article on that.

    In your case something like that should be sufficient:

    <!DOCTYPE html>
    <html lang="de">
        <head>
            <title>Hello World</title>
            <style>
    
            html, body {
                height: 100%;
                margin: 0;
                padding: 0;
                width: 100%;
            }
    
            body {
                display: table;
            }
    
            .my-block {
                text-align: center;
                display: table-cell;
                vertical-align: middle;
            }
            </style>
        </head>
        <body>
        <div class="my-block">
           WORD1<br />
           WORDWORDWORDWORD2
        </div>
        </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am a bit new with android but I have some java experience. So
I'm new to Java, but have some OOP experience with ActionScript 3, so I'm
I have little JAVA coding experience (some classes at university) but none in the
I have some experience writing web applications in Java for class projects. My first
I have Java experience and recently am doing some C++ coding. My question is
I have some experience using parallel extensions in .Net development, but I was looking
Hi I have some experience with programming but I'm not very good with pointers.
Hey, i have some experience with MVC. but I'm new to rails. I'm using
I don't have much experience in this yet but the high level question that
I have a Java/Spring MVC/JSP/JSTL webapp. We have a designer that gave us some

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.