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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T05:21:01+00:00 2026-06-18T05:21:01+00:00

So I’m trying to set the height of the content class but it doesn’t

  • 0

So I’m trying to set the height of the “content” class but it doesn’t seem to be working. I’m quite a noob at nested DIVs and I’ve tried the fixes that I’ve found googling but nothing seems to work. Help?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <meta name="description" content="Website Horizontal Scrolling with jQuery" />
    <meta name="keywords" content="jquery, horizontal, scrolling, scroll, smooth"/>
       <link rel="stylesheet" href="css/style.css" type="text/css" media="screen"/>
</head>
<style>   
body {
background-mage: url(bg.jpg), url(bgrepeat.jpg);
background-repeat: no-repeat, repeat-x;
background-attachment:fixed;
background-position:left bottom;
background-color: #D3C8B6;
}
#wrapper {
text-align: center;
width: 100%;
position:absolute;
bottom:0;
}
 #header,
  #main,
  #sidebar,
  #footer {
    display:inline;
    position:relative;
    float:left;

  }
  #header,
  #footer {
    width:100%;
    background-color:#eee;
            opacity:1.0;
filter:alpha(opacity=100);
  }
  #header {
    margin-bottom:1%;
    height:100px;
  }
  #footer {
    margin-top:1%;
    height:40px;
  }
  #main {
    width:20%;
    height:475px;
    margin-right:1%;
    text-align: center;
    background-color:#eee;
            opacity:1.0;
filter:alpha(opacity=100);
  }
  #sidebar {
    width:79%;
    height:475px;
    overflow: hidden;
  }
   .viewport{
       width:100%;
       height:475px;
       overflow-x:scroll;

   }

   .inside{
       width:9000px;
       height:200px;
   }

   .inside div{
       height:450px;
       width:700px;
       float:left;
       margin-right:4px;

   }
   .content {
       height:100px;
       width:300px;
       overflow-y: scroll;
       position:relative;
       top: 10px;
       right:10px;
       }

   .one{
       background-image: url(images/frame.png)
   }

   .two{
       background-image: url(images/frame2.png);
       text-align:center;
       z-index: 1;
   }

   .three{
       background-image: url(images/frame1.png);
   }
   .four{
        background-image: url(images/frame3.png);
   }
   .five {
       background-image: url(images/frame4.png);
   }

</style>
<body>
<div id="wrapper">
<div id="header">
</div>
<div id="main">
<div class="one-l">Home</div>
 <div class="two-l">Portfolio</div>
 <div class="three-l">Resume</div>
 <div class="four-l">Blog</div>
 <div class="five-l">Contact</div>
 </div>

<div id="sidebar">

<div class="viewport" >
     <div class="inside" >
         <div class="one">home</div>
         <div class="two">
         <div class="content" width="200">
         Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas bibendum, leo vitae ornare dignissim, lorem urna tempor felis, in fringilla urna justo non velit. Cras imperdiet viverra ligula, vitae auctor neque elementum eget. In nec quam est, quis molestie magna. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec gravida, elit a iaculis consequat, ligula nisl cursus turpis, in giat eu placerat vel, viverra vel nibh. Ut vitae felis ac nisi euismod porta. Aliquam et gravida mauris. Maecenas id massa ligula, et blandit orci. In hac habitasse platea dictumst. Donec eu tortor libero. Donec eget leo mi. Mauris quis neque vitae massa facilisis placerat ut et felis. Nullam eleifend faucibus diam, sit amet pellentesque leo euismod id. Morbi interdum placerat nibh, in mattis sem eleifend quis. Nunc non nunc sed lorem condimentum molestie mattis blandit dui. Nulla urna ligula, auctor id venenatis eu, placerat ut dui. In fringilla purus gravida sapien cursus imperdiet porta ligula lobortis. Sed pellentesque, nisi quis tristique pulvinar, justo odio sollicitudin risus, non euismod dui ante nec tortor.
         </div></div>
         <div class="three">resume</div>
         <div class="four">blog</div>
         <div class="five">contact</div>
     </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-06-18T05:21:02+00:00Added an answer on June 18, 2026 at 5:21 am

    This is happening because the height property defined in .inside div takes precedence. In this case, to make the height property work inside class .content you must do something like this:

    .content
    {
        height: 200px !important;
    }
    

    You can see a Demo at JS Bin: http://jsbin.com/exucek/1/edit

    Try changing the height property value to see it being applied in real time. You’ll see that when the value is too small, scroll-bars appear.


    If you’re curious about that !important CSS rule, take a look here:

    What does !important mean in CSS?

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

Sidebar

Related Questions

I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I am trying to find ID3V2 tags from MP3 file using jid3lib in Java.
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I am using JSon response to parse title,date content and thumbnail images and place
I am trying to render a haml file in a javascript response like so:
I am doing a simple coin flipping experiment for class that involves flipping a

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.