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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T03:12:13+00:00 2026-05-24T03:12:13+00:00

Browser shows div only when I set exact height. But i want to create

  • 0

Browser shows div only when I set exact height. But i want to create resizable div according it’s contents. Tried height: auto and height:100%. It doesn’t help.

My div looks like that. It’s background div of sidebars and content.

.wrapper
    {
        width: 80%;
        height:200px;
        max-width: 1260px;
        min-width: 780px;
        margin: 0 auto;     
        background-image:url(core/design/img/transfff.png);
        -moz-border-radius: 15px 15px 0px 0px;
        border-radius: 15px 15px 0px 0px;
    }

UPDATE
my html looks like that

<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<style type="text/css">

body {
    font: 100%/1.4 Verdana, Arial, Helvetica, sans-serif;
    background-image: url(core/design/img/bg.png);
    background-position:top left;
    background-size:100%;
    background-color:#fff;
    background-repeat:no-repeat;
    margin: 0;
    padding: 0;
    color: #000;
}


ul, ol, dl { 
    padding: 0;
    margin: 0;
}
h1, h2, h3, h4, h5, h6, p {
    margin-top: 0;
    padding-right: 15px;
    padding-left: 15px; 
a img { 
    border: none;
}

a:link {
    color:#414958;
    text-decoration: underline; 
}
a:visited {
    color: #4E5869;
    text-decoration: underline;
}
a:hover, a:active, a:focus { 
    text-decoration: none;
}


.container {
    width: 80%;
    max-width: 1260px;
    min-width: 780px;
    margin: 0 auto; 
}

.wrapper
{
    width: 80%;
    height:200px;
    max-width: 1260px;
    min-width: 780px;
    margin: 0 auto; 
    background-image:url(core/design/img/transfff.png);
    -moz-border-radius: 15px 15px 0px 0px;
    border-radius: 15px 15px 0px 0px;
    overflow: visible
}

.header {
padding:20px;
}

.sidebar1 {
    float: left;
    width: 20%;

    padding-bottom: 10px;
}
.content {
    padding: 10px 0;
    width: 60%;
    float: left;
}
.sidebar2 {
    float: left;
    width: 20%;

    padding: 10px 0;
}

.content ul, .content ol { 
    padding: 0 15px 15px 40px; 
}


ul.nav {
    list-style: none; 
    border-top: 1px solid #666; 
    margin-bottom: 15px; 
}
ul.nav li {
    border-bottom: 1px solid #666; 
}
ul.nav a, ul.nav a:visited{
    padding: 5px 5px 5px 15px;
    display: block; 
    text-decoration: none;
    color: #000;
}
ul.nav a:hover, ul.nav a:active, ul.nav a:focus {
    background: #6F7D94;
    color: #FFF;
}

/* ~~The footer ~~ */
.footer {
    padding: 10px 0;
    position: relative;
    clear: both;
}


.fltrt {  
    float: right;
    margin-left: 8px;
}
.fltlft { 
    float: left;
    margin-right: 8px;
}
.clearfloat { /
    clear:both;
    height:0;
    font-size: 1px;
    line-height: 0px;
}
-->
</style><!--[if lte IE 7]>
<style>
.content { margin-right: -1px; } /* this 1px negative margin can be placed on any of the columns in this layout with the same corrective effect. */
ul.nav a { zoom: 1; }  /* the zoom property gives IE the hasLayout trigger it needs to correct extra whiltespace between the links */
</style>
<![endif]--></head>

<body>

<div class="container">
  <div class="header"><a href="#"><img src="core/design/img/logo.png" alt="Insert Logo Here" name="Insert_logo" width="438px" height="95" id="Insert_logo" style=" display:block; margin:0 auto;" /></a> 
    <!-- end .header --></div>
    <div class="wrapper">
  <div class="sidebar1">
</div>
  <div class="content">
    </div>
  <div class="sidebar2">
  </div>
    </div>
  <div class="footer">
  </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-05-24T03:12:14+00:00Added an answer on May 24, 2026 at 3:12 am

    div‘s will naturally resize in accordance with their content.

    If you set no height on your div, it will expand to contain its conent.

    An exception to this rule is when the div contains floating elements. If this is the case you’ll need to do a bit extra to ensure that the containing div (wrapper) clears the floats.

    Here’s some ways to do this:

    #wrapper{
    overflow:hidden;
    }
    

    Or

    #wrapper:after
    {
    content:".";
    display:block;
    clear:both;
    visibility:hidden;
    }
    

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

Sidebar

Related Questions

There is no scroll bar when browsed with firefox, but it shows up in
By default in all browsers, title attributes only show on mouse over. I want
hoping some one can shed some light on my problem. Basicly I only want
I am using multiple DIV tags with the same content to create one visible
I have django formsets on my page, with several extra forms; I only want
I have a a parent div that spans the width of the browser with
I a have a menu, which on rollover shows a div which is not
I need to lock the browser scrollbars when I show a div that represent
I wrote those simple lines in order to show an .elemproduct div only if
Basically, Its a login form. I want it to only show the login form,

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.