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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T19:06:14+00:00 2026-05-31T19:06:14+00:00

I search everywhere and tried everything I could, but I cannot make my second

  • 0

I search everywhere and tried everything I could, but I cannot make my second DIV align. See code below:

image on tinypic.com

As you can see, I have added a white border so that we can see the exact size. The problem here is with the social media buttons DIV on the right.

Here’s the HTML:

<div id="content_header">
    <div id="schcontainer" class="schcontainer">
        <%= form_tag({:controller => 'list', :action => 'index'}, :id => 'searchfrm') do %>
            <div id="searchboxwrap">
                <%= text_field_tag(:query, value=@query, options={:size => "47", :placeholder => "Enter a product name..."}) %>
                <%= text_field_tag(:selectedpage, value=@page, options={:class => "hiddenelement"}) %>
            </div>
            <%= submit_tag("") %>
        <% end %>
        <div class="clear"></div>
    </div>   
    <div id="mediabuttons">
        <div class="fb-like" data-send="false" data-layout="button_count" data-show-faces="false"></div>
        <div><a href="https://twitter.com/share" data-url="<%=renderFullUrl%>" data-count="horizontal" class="twitter-share-button" data-size="small">Tweet</a></div>
        <div class="g-plusone" data-size="medium"></div>
        <div><script src="//platform.linkedin.com/in.js" type="text/javascript"></script><script type="IN/Share" data-counter="right"></script></div>
    </div>
</div>
<div class="clear" id="fb-root"></div>

And here’s the CSS

#content_header{
    width:100%;
    background-color:#333333;
    border-bottom: 1px solid #999999;
    -webkit-box-shadow: 0 0 3px 0 #000;
    -moz-box-shadow: 0 0 3px 0 #000;
    box-shadow: 0 0 3px 0 #000;
    padding: 10px 10px 10px 10px;
    height:35px;
    vertical-align: top;
}

#schcontainer{
   width:48%;
   border: 1px solid #FFFFFF;   
}

#mediabuttons{
    width:39%;
    float:right;
    text-align:right;
    border: 1px solid #FFFFFF; 
}

#mediabuttons div{
    margin:0;
    padding:0;
    width:25%;
    float:left;
}


.clear {
   height: 0;
   font-size: 1px;
   margin: 0;
   padding: 0;
   line-height: 0;
   clear: both;
}    

Any help will be greatly appreciated.

Cheers!

UPDATED CSS:

#content_header{
    float:left;
    overflow:hidden;
    width:100%;
    background-color:#333333;
    border-bottom: 1px solid #999999;
    -webkit-box-shadow: 0 0 3px 0 #000;
    -moz-box-shadow: 0 0 3px 0 #000;
    box-shadow: 0 0 3px 0 #000;
    padding: 10px 10px 10px 10px;
}
  • 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-31T19:06:15+00:00Added an answer on May 31, 2026 at 7:06 pm

    I prefer to use display:inline-block as opposed to floats when possible and now seems to be one of those times. Replacing the floats with these on the two primary divs should do the trick. Your tinypic images aren’t working for me but try this jsfiddle and see if it’s producing the results you are looking for. http://jsfiddle.net/k96BU/

    I added a vertical-align:top so they would be lined up properly as well.

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

Sidebar

Related Questions

Can you make this R code faster? Can't see how to vectorize it. I
I've search everywhere for a pointer to this, but can't find one. Basically, I
I am having issue with png image on IE6 and tried to search every
I've search everywhere but haven't found what I'mlooking for even though I'm convinced there
I search for nurple in a file. I found it, great. But now, every
How do you get the directory target of a shortcut folder? I've search everywhere
I've searched everywhere, but I can't seem to find any help... I have some
Searched everywhere but couldn't find anything. My question is: is it possible to programmatically
Where are the Windows binaries for the command-line version of SVN? Everywhere I search,
I'm very new to DLL objects and I search everywhere and can't find the

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.