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

  • Home
  • SEARCH
  • 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 6120727
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T15:42:05+00:00 2026-05-23T15:42:05+00:00

I’m having trouble finding the right solution for this fully fluid layout. I want

  • 0

I’m having trouble finding the right solution for this fully fluid layout. I want the Sub-title in the following fiddles to be vertically center aligned next to the icon. The Sub-title may break onto multiple lines depending on the size of the browser (and varying length of text).

I have two fiddles prepared – the first attempt is my preferred approach as I’ve more thoroughly tested similar layouts:

http://jsfiddle.net/mmDFC/

The second fiddle, is an attempt on the same situation using display:table-cell;, but for the life of me I couldn’t fix up the lost right text alignment, and I’ve also never thoroughly tested IE6+ compat with this display type:

http://jsfiddle.net/mmDFC/1/ (this almost works, save the loss of text-align:right;)

I have looked up a host of similarly titled SO questions but couldn’t find what I wanted, so great answer points me to one I’ve missed, or come up with a solution to the above.

All in the name of vertical aligned text… :/


Browser update: I fiddled in Chrome, I see IE8 behaves similarly, but Ffox3 behaves differently for solution 2.

  • 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-23T15:42:06+00:00Added an answer on May 23, 2026 at 3:42 pm

    If I understand what you want right, you just need to add display:table to the h2

    <div class="wrapper clearfix">
        <h1>Main Title</h1>
        <h2>
            <span id="fluid">
                Fluid Span
            </span>
            <span id="icon">
                Lots of long text...
            </span>
    
        </h2>
    </div>
    
    .clearfix:after {
        content:"";
        display:block;
        clear:both; 
    }
    h2 {
        float:right;  
        text-align:right; 
        background-color:#999;
        display:table;
        width:43%;
    }
    span {
        background-color:#ccc;   
        border:1px #000 solid;
        vertical-align:middle;
    }
    span#fluid {
        display:table-cell;
    
        height:100%;
    
    }
    
    span#icon { 
        display:table-cell;
        width:60px;
        height:40px;
    }
    

    http://jsfiddle.net/thomas4g/WecP4/28/

    Let me know if this isn’t what you want.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
this is what i have right now Drawing an RSS feed into the php,
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm having trouble keeping the paragraph square between the quote marks. In firefox the
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a French site that I want to parse, but am running into
I want use html5's new tag to play a wav file (currently only supported
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and

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.