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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:36:25+00:00 2026-05-23T07:36:25+00:00

I have 1 div wrapping h2 and image wrapped in div with class img.

  • 0

I have 1 div wrapping h2 and image wrapped in div with class img. h2 is float:left and img float:right.

img div has image inside. What I want is

if image is height and width 100px than its not vertical-align:middle. Help please.

Tested with vertical-align:middle

CSS

.ver-mainbox{float:left; width:898px; border:1px solid #c3c3c3; padding:0px; height:122px; margin-bottom:15px; background-color:#ffffff;}
.ver-mainbox h2{font-size:18px;color:#000; padding-left:10px; margin:0px; vertical-align:middle; width:500px; float:left; padding-top:42px;}
.ver-mainbox .img{float:right; padding:0px; width:186px; height:122px;}

HTML

<div class="mainbox-area">
        <!-- Box start v1 -->
        <div class="ver-mainbox">                                                   
            <h2>Immunizations</h2>
            <div class="img"><img src="../../Content/images/v1.gif" alt="" title="" /></div>
        </div>                                                
        <!-- Box start v1 -->                                                               
</div>
  • 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-23T07:36:25+00:00Added an answer on May 23, 2026 at 7:36 am

    vertical-align is only applicable to table cells. You’ll need to rethink how you go about this or use the display:table-* properties.

       <div style="display:table">                                               
            <h2 style="display:table-cell;vertical-align:middle">Immunizations</h2>
            <div style="display:table-cell;vertical-align:middle">
                <img src="../../Content/images/v1.gif" alt="" title="" />
            </div>
       </div> 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an image that is wrapped inside a couple of DIV elements <div
I have div which has three buttons as, <div id=buttons> <input id=preview class=ButtonStyle type=submit
It seems that in Firefox, if I have div A with fixed width/height and
I have a div with a width of 200px. There is text inside that
I want to float a paragraph next to image, but without wrapping the image.
HTML: <br /> <div class=UpperTitle> <img src=Images/CableSolve Logo.jpg align=absmiddle padding-right: 10px; /> CableSolve Web
I have a containing div that is constrained in its height and width. It
Hi have a div that's wrapping images..The width of this DIV can change so
I have a list element with div content inside and an a tag wrapping
I have the age-old problem of a div wrapping a two-column layout. My sidebar

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.