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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:44:03+00:00 2026-05-23T13:44:03+00:00

I have 2 divs nested within a parent div. Im having a problem setting

  • 0

I have 2 divs nested within a parent div.

Im having a problem setting the Schedule Div and PhoneNumber Div correctly. I’ve tried adding .clear and float tags.

http://www.virtualpetstore.com

enter image description here

The 2 Divs should appear as is in the Illustration, but when I view this with a larger monitor, the 2 Divs are way off to the right

I’ve tried to change the floats to right, then change the position to relative which completely breaks the page.

*{ margin:0; padding:0 }
body {
    background-color: #9EB0C8;
    font-family: Arial,Helvetica,sans-serif;
    font-size: 62.5%;
}
#top-wrap {
    height: 133px;
    margin: 0 auto;
    width: 882px;
    position: relative;
    z-index:100;
    background-color: Yellow;
}
#head-logo {
    height: 133px;
    width: 214px;
    float:left;
    position:relative;
    /*margin: 0px 0 0 58px;*/
    background: url("/images/Home/Logo7.png") no-repeat scroll 0 0 transparent;
    background-position:bottom;
    background-color: Green;
}
#head-title {
    height: 55px;
    width: 385px;
    float:left;
    position:relative;
    margin: 9px 0 0 18px;
    background: url("/images/Home/LogoTitle1.png") no-repeat scroll 0 0 transparent;
    background-color:Red;
}  
#contact-button {
    height: 28px;
    width: 165px;
    float:left;
    position:absolute;
    margin: 7px 0 0 715px;
    background-color:orange;
}
#contact-phone {
    height: 20px;
    width: 134px;
    margin: 28px 0 0 745px;
    float:left;
    position:absolute;
    color:#FFFFFF;
    font-family: Arial,Impact,Impact5,Charcoal6,sans-serif;
    font-size: 2.1em;
    text-align: right;
    background-color:Blue;
}    
a.contact {
    background-image: url("/images/Home/RapidButtonSprite4.png"); 
    background-position:left bottom; /* 0px -27px; */ 
    display: block;
    font-size: 11px;
    text-align: center;
    width: 165px;
    height: 27px;   
}
a.contact:hover {
    background-position:left top; /*0px 0px;*/
} 
#navigation-primary {
    float:left;
    position:relative;
    margin: 18px 0 0 4px;
}

Here is the Relevent HTML:

<div id="top-wrap">
    <div id="head-logo">
        <a href="/"></a>
    </div>
    <div id="head-title">
    </div>
    <div id="contact-button">
        <div id='contact-form'>
            <a class="contact" href="#"></a>
        </div>
    </div>
    <br style="clear: right" />
    <div id="contact-phone">
        703-425-6000
    </div>
    <div id="navigation-primary">
    ....
    </div>
</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-23T13:44:04+00:00Added an answer on May 23, 2026 at 1:44 pm

    The easier and cleaner way would be to switch the order of the divs and float them to the right. So

    <div id="contact-button">
        <div id='contact-form'>
            <a class="contact" href="#"></a>
        </div>
    </div>
    
    <div id="head-title">
    </div>
    

    And

    #head-title {
        height: 28px;
        width: 165px;
        float:right;
        margin: 0;
        background-color:Red;
    }  
    #contact-button {
        height: 28px;
        width: 165px;
        float:right;
        margin: 0;
        background-color:orange;
    }
    

    http://jsfiddle.net/jasongennaro/Cm7jv/1/

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

Sidebar

Related Questions

I have 2 divs nested within a parent div, and I cant figure out
I have this jQuery: $(this).parent().parent().find(.license_tooltip).stop(true, true).fadeIn(200); The $(this) object is nested within two div
I have a parent div and few other divs nested in it containing text.
I have a div with two nested divs inside, the (float:left) one is the
I have a series of links nested within a div. When one of those
I have a couple of div tags nested within each other and a few
I have a div with several nested divs. All the child div's are float:left
I have float left and float right <div> nested within a light blue box
I keep finding that if I have nested divs inside each other, and one
I have three divs : <div id=login /> <div id=content /> <div id=menu />

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.