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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:07:50+00:00 2026-05-26T15:07:50+00:00

I am attempting to style some html that I do not have control over.

  • 0

I am attempting to style some html that I do not have control over. WYSIWYG. What I need to do is:

  1. Have the text not wrap under the image.
  2. Control the text’s vertical position. I am trying to position it approximately along the horizontal centerline of the image.
  3. Text cannot be fixed width (the image however, can and is fixed width).

I have tried display: table, floating the text element and absolute positioning text, but they all had different problems. Thank you for any further ideas.

http://jsfiddle.net/6fjCX/3/ (you may need to shrink frame width to see effect)

img { 
   height: 66px; 
   width: 165px; 
   border: 1px solid black; 
}
#title-text { 
   font-size: 32px; 
   line-height: 36px; 
}

<h1 id="title-heading" class="pagetitle">
    <a href=""><img class="logo global custom" src="" alt=""></a>                
    <span id="title-text">
        <a href="">Installing Confluence 3.4 on a Windows 64 bit system</a>
    </span>
</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-05-26T15:07:50+00:00Added an answer on May 26, 2026 at 3:07 pm

    I set a width on both elements as well as the wrapper <h1>, to make sure they would float next to each other and there would be no text underneath the image.

    Try something like this: http://jsfiddle.net/6fjCX/5/

    img {
        height: 66px;
        width: 165px;
        border: 1px solid black;
        background: red;
    
        /* Float the image */
        float:left;
    }
    #title-text {
        font-size: 28px;
    
        /* Since the element comes after in the markup */
        float:right;
    
        /* (h1 width) - (img width) - (#title-text left padding/margin) */
        width:420px;
    }
    #title-heading {
        /* set to a width that works for you */
        width:600px;
    }
    

    You could also absolutely position the span and set position:relative on the h1, but I try to avoid absolute positioning when possible.

    Demo: http://jsfiddle.net/6fjCX/7/

    img {
        height: 66px;
        width: 165px;
        border: 1px solid black;
        background: red;
        float:left;
    }
    #title-text {
        font-size: 28px;
        position:absolute;
        top:0;
    
        /* (img width) + (span left padding) */
        left:175px;
    }
    
    #title-heading {
        /* contain absolute positioned elements */
        position:relative;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently having problems with attempting to style the HTML rich text editor
I am attempting to create a Tab Control Style that basically looks like buttons
I am attempting to do some dynamic loading that includes javascript, css, and html
I have a file containing perl-style regexs of the form /pattern/replace/ that I'm attempting
I am attempting to compose a style sheet that, given an XML input (obviously)
I am attempting to create my own custom Autocomplete style dropdown control in c#
I'm attempting to pull up all entities that have a name that doesn't partially
I want to be able to have a generic style template that can switch
Hopefully some Custom Control Designers/Builders can help I'm attempting to build my first custom
I'm attempting to parse some Wiki-style markup using the Javascript Creole Wiki Markup Parser

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.