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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T22:49:23+00:00 2026-06-15T22:49:23+00:00

I am using a max-width attribute to force a new line. After the new

  • 0

I am using a max-width attribute to force a new line. After the new line, the text goes to the bottom of the image instead of remaining in the middle.

CSS:

.description{
font:bold 16px Verdana, Helvetica, sans-serif;
color: #3D85A7;
margin: 0 auto 20px auto;
text-align:center;
max-width:500px;
}

.icon{
max-height: 90px;
max-width: 85px;
margin: 10px 0 10px 10px;
vertical-align:middle;
}​

HTML:

<div class="description">
    <img class="icon" src="http://cleanfiles.net/images/pdf.png">
    This is a really really really really long file name.pdf
</div>​

For a live example, view it on a JSFIDDLE here.

ADDED: Please also notice that my current css works well with short file names (the icon moves in and it stays centered). The answers so far have involved float:, which does not seem to work well with a shorter filename.

  • 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-15T22:49:24+00:00Added an answer on June 15, 2026 at 10:49 pm

    My solution would be to change the HTML to (adding <p> tag):

    <div class="description">
      <p>
        <img class="icon" src="http://cleanfiles.net/images/pdf.png">
        This is a really really really really long file name.pdf
      </p>
    </div>​
    

    And then add the attribute float: leftto the picture.

    EDIT:

    Here is the link with the text centered (maybe not the best way but it works): http://jsfiddle.net/LXS6x/9/

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

Sidebar

Related Questions

How to set max image size and weight/height using Dragonfly? Max size will be
I'm using fgets with stdin to read in some data, with the max length
I have a tab setup as an Activity extension using API8 max. In this
I'm using Python's max and min functions on lists for a minimax algorithm, and
I'm using Python's max function to find the largest integer in a dictionary called
I am using declare @insertsql nvarchar(MAX) --above @insertsql for sp_executesql takes only nvarchar as
I know you can set max heap size at startup using -Xmx but is
Ok I'm using SQL Server 2008 and have a table field of type VARCHAR(MAX)
I'm loading an XML in SQL using OpenXML while declaring the variable the max
I am using jQuery UI's new spinner widget. Here is the init/config: $(function() {

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.