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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T02:24:37+00:00 2026-06-06T02:24:37+00:00

How can I align the bottom of an inline block (call it ‘IB’) with

  • 0

How can I align the bottom of an inline block (call it ‘IB’) with the bottom of the text – excluding descenders like that on ‘g’ – in a parent element (call it ‘PE’)? This should be in a way which generalises whatever the size of the text – I don’t want to hardcode size-specific pixel values.

Here is an example of the HTML I’d use, with the classes I’d need CSS for:

<div class="pe">
    Parent text line
    <span class="ib" style="display: inline-block;">
        - and child text line
    </span>
</div>

And here’s what I’d like it to look like:

http://imgur.com/S1l7Y

  • 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-06T02:24:39+00:00Added an answer on June 6, 2026 at 2:24 am

    OP updated saying: “Thanks, but I’ve edited the question to clarify I don’t want to hardcode size-specific pixel values.”

    In that case, I’m afraid there isn’t a solution that will automatically fix different lines with different text sizes. The other solution I provided isn’t even perfect across all of the browsers with some combinations of font sizes, because Chrome/Opera round inexact values differently than Firefox/IE, so even with my solution, you’d need to use some browser-specific css. The only thing similar to an universal solution would be setting vertical-align: middle; but I wouldn’t trust that to work consistently.

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

Sidebar

Related Questions

How can I vertically align a Label and TextBlock at Top so that their
I can't seem to get this text to align vertically. Can someone please tell
I have this CSS code with an inline-block . Can anyone tell me how
I just can't seem to figure this out. I've tried text-align: center; , display:
How can I align the first column to the right and second column to
I can't find an option in Netbeans (7) to align variables. For example, I
I'm experimenting with DIVs to align my page's contents: http://labs.pieterdedecker.be/test/test.htm As you can see,
I am using Eclipse & JDE 4.5.0 plug-in. How to align fields vertically. Can
Can this be done? It seems like this should be possible. In general, I
I have the following that I execute inline on a number of screens: tinyMCE.init({

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.