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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T13:53:24+00:00 2026-06-08T13:53:24+00:00

I have been recently designing some content which needs to be side by side

  • 0

I have been recently designing some content which needs to be side by side and have the height automatically resize, but the height doesn’t resize. The div doesn’t expand to the size of the items inside of it. Is there a way to allow the div to expand to the size of the elements inside of it?

CSS

* {
    padding: 0px;
    margin: 0px;
}
body {
    font-family: 'Metrophobic', sans-serif;
    background-color: #c5c5c5;
    background-image: url('../images/noise.png');
}
#container {
    width:900px;
    background-color: #dbdbdb;
    margin-top: 20px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 20px;
    box-shadow: 0px 0px 5px black;
}
.center_align {
    display: inline-block;
    margin-left: auto;
    margin-right: auto;
}
#header {
    height:80px;
    font-size: 60px;
    padding: 10px;
    text-align: center;
}
#menu {
    width:900px;
    height:50px;
    margin-top: 10px;
    margin-bottom: 10px;
    background-color: #cacaca;
}
.menu_link {
    width:224px;
    height:50px;
    text-align: center;
    font-size: 35px;
    float: left;
    opacity: 0.3;
    background-color: #cacaca;
}
.menu_divider {
    width: 1px;
    height: 50px;
    background-color: #dbdbdb;
    float:left;
}
#content {
    width: 900px;
    height: auto;
    padding: 10px;
    font-size: 20px;
    height: auto;
}
.line_container {
    margin-top:5px;
    margin-bottom:5px;
}
#footer {
    width:900px;
    height:22px;
    padding-top:2px;
    text-align: center;
    font-size: 14px;
    color:black;
}

a:link {
    color:black;
    text-decoration: none;
}
a:visited {
    color:black;
    text-decoration: none;
}
a:hover {
    color:black;
    text-decoration: none;
}
a:active {
    color:black;
    text-decoration: none;
}

a.link:link {
    color:#21525e;
}
a.link:visited {
    color:#21525e;
}
a.link:hover {
    color:#307f91;
    text-decoration: underline;
}
a.link:active {
    color:#307f91;
    text-decoration: underline;
}

HTML

<html>
<head>
<title>Home</title>
<link rel="shortcut icon" href="../images/favicon.ico" />
<link href="http://fonts.googleapis.com/css?family=Metrophobic" rel="stylesheet" type="text/css" />
<link href="../css/style.css" rel="stylesheet" type="text/css" />
<style type="text/css">
.icon {
    width:100px;
    height:100px;
    border: 3px solid white;
    border-radius:25px;
    margin-left:10px;
    margin-right:10px;
    background-position: center center;
    background-size: 100px 100px;
}
</style>
</head>
<body>
<div id="container">
    <div id="header">
        <div class="center_align">
            <img src="../images/header_icon.png" alt="header_icon" width="80" height="80" style="margin-right:20px;float:left;" />
            <div style="height:80px;float:left;">Title</div>
        </div>
    </div>
    <div id="menu">
        <a href="../home" class="menu_link">Home</a>
        <div class="menu_divider"></div>
        <a href="../tutorials" class="menu_link">Tutorials</a>
        <div class="menu_divider"></div>
        <a href="../about" class="menu_link">About</a>
        <div class="menu_divider"></div>
        <a href="../contact" class="menu_link">Contact</a>
    </div>
    <div id="content">
        <div style="width:900px;">
            <div class="icon" style="background-image:url('image.jpg');float:left;"></div><div style="float:left;margin-top:20px;">I'm a freelance Web, Iphone, and Game developer.</div>
        </div>
    </div>
    <div id="footer">
        &copy;&nbsp;Cameron
    </div>
</div>
</body>
</html>
  • 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-08T13:53:27+00:00Added an answer on June 8, 2026 at 1:53 pm

    Looks like the problem is that the #footer element isn’t properly cleared. Add clear: both; to #footer. This pushes the cleared element below the floated elements, and should functionally result in the same visual fix.

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

Sidebar

Related Questions

I have recently been rewriting some of my iphone app because a couple of
I have recently been asked to estimate a piece of work which will provide
I've been working on some solutions for some questions that have been recently posted
I'm relatively new to java (specifically swing) and have recently been making some fairly
I have been recently learning some OOP PHP and seem to have run into
I have been using Asp.Net for designing web applications recently and was wondering if
Hi I have been recently exploring some of the Javascript mobile frameworks that can
I have recently been developing a website which relies a large part on the
I have been recently running into an issue in which my web application will
I'm relatively new to cross-platform mobile development, and recently have been going through some

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.