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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T01:26:46+00:00 2026-06-11T01:26:46+00:00

I want to to have content like below for this first one I used

  • 0

I want to to have content like below

1
for this first one I used line-height 40px

enter image description here
for the second one I used line-height 120px

This means as content varies I have to change the line-heights
Is there any way to make this type of centering in a fixed dimensional div without
changing the class

Can I do this without Javascript ?
If I use height as 120px I am getting div s like this ( I dont want this )
enter image description here

style of the div is

<style>
 .rectangle {
        postion:absolute;
    box-shadow: 10px #333;
    border-radius: 23px;
    border-top-right-radius: 0;
    border:6px solid;
    block:inline;
    line-height: 123.6px;
    width:200px;
    background-color: #444;
    float: left;
    margin: 5px;
    text-align: center;
    color:white;
   font-weight:900;

    text-decoration:none;
}
</style>
  • 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-06-11T01:26:47+00:00Added an answer on June 11, 2026 at 1:26 am

    Vertical centring is tricky. Chris Coyier at CSS tricks has a great article on this – http://css-tricks.com/centering-in-the-unknown/

    My personal preference is the ghost pseudo element, but it’s only viable in IE8+ so you may need to look at some of the other examples if legacy IE support is necessary.

    Here’s a working fiddle – http://jsfiddle.net/tommarshall/eGJQC/3/

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

Sidebar

Related Questions

i have a content stored in mysql like below: first line second line third
I want to parse a html content that have something like this: <div id=sometext>Lorem<br>
I want to be able to have default text like Enter content here... appear
I have a texbox and I want to change it's content every second in
I have the tweet HTML source like below. They are line by line. In
I have the document, for example: This is the first line <br> This is
I have a an unordered list like this: <ul id=mylist> <li id=1>Heading</li> <li id=2>Second</li>
I have two scripts and want to combine them in one line. I have
I have some content that I want to appear on multiple pages of my
I have some content I want to show in iframe with fancybox. When I

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.