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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T11:24:39+00:00 2026-06-13T11:24:39+00:00

This should be interesting. Here’s what I’m trying to do with CSS: The words

  • 0

This should be interesting. Here’s what I’m trying to do with CSS:

  1. The words “An Example Alignment” should be in a single <h1> element.
  2. The word “Alignment” should be on the second line (easy with a <br /> tag).
  3. The word “An” should be smaller than the other words (easy with a <span> tag).

enter image description here

So we have:

<h1><span>An</span> Example <br />Alignment</h1>

But here’s the catch:

  • I would also like to align the first letters of the 2nd and 3rd words with each other vertically, and that’s where I run into problems.

Here’s what it should look like: http://jsfiddle.net/Baumr/H2Pzr/

But that’s an ugly solution as there are two <h1> elements.

Any ideas of how to do this with CSS by keeping the HTML the same? Very curious to hear. Thank you in advance.

P.S. I could also put “An” into a separate <span>, but I would prefer to keep everything in a single <h1>.)

  • 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-13T11:24:40+00:00Added an answer on June 13, 2026 at 11:24 am

    I would use two span classes in the same H1 tag:

    <h1>
        <span class="small-text">An</span> Example 
        <span class="line-two">Alignment</span>
    </h1>
    

    Then update your CSS accordingly:

    h1 {
        font-size: 30px;
    }
    
    span.small-text {
        font-size: 20px;
    }
    
    .line-two{
        display:block;
        margin-left: 31px;
    }
    

    You don’t even need the <br /> since you can just display the second span as display:block;
    Updated fiddle here: http://jsfiddle.net/H2Pzr/6/

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

Sidebar

Related Questions

I thought this question could be interesting to put it up here. For example
This should be a simple answer. I'm just not knowledgeable enough in CSS to
I found this interesting thing when I was trying out the new feature optional
Here is the list of points that is interesting for me. Should we put
Edit : Here is a much more simpler example of this issue (i've deleted
This should be a simple one: I have an observableArray object called To in
This should be a no brainer but I have a small mystery with the
This should be simple, but I'm getting confused. I have a parent/child tables -
This should be a really, really simple one, I would assume. I'm throwing together
This should be a pretty straightforward question. I have the following code, which forms

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.