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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T07:08:05+00:00 2026-06-10T07:08:05+00:00

I am attempting to layout a site: http://kenzshop.com/Brandon/index I cannot get the main content

  • 0

I am attempting to layout a site:

http://kenzshop.com/Brandon/index

I cannot get the main content area (blue colored)to align correctly.

The header (red) has a fluid with, the sidebar (yellow) has a fluid height, the main content area should be fluid width and height, but I cannot figure out how to get it to align correctly.

It should align width-wise with the header.

Can anyone see what my issue is?

HTML:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<title>Title of document</title>
<meta http-equiv="Content-Type" content="text/xhtml; charset=utf-8"></meta>
<meta http-equiv="Content-Type" content="text/css; charset=utf-8"></meta>
<link rel="stylesheet" href="style.css" type="text/css" />
</head>

<body>
   <div id="header"></div>
   <div id="main"><!--<iframe src="http://www.cnn.com/"/> --></div>
   <div id="sidebar"></div>
</body>

</html>

CSS:

body {
   margin:0;
   padding:0;
   height:100%; 
}

#header{
   height: 80px;
   border: 1px solid black;
   padding: 5px;
   margin-top: 5px;
   margin-left: 5px;
   margin-right: 5px;
   background-color:red;
}

#main{
   position:absolute;
   left:0;
   top:90px;
   right: 263px;
   padding:0;
   margin-top: 12px;
   margin-left: 5px;
   margin-bottom:5px;
   height:99% !important; /* works only if parent container is assigned a height value */
   width:100%;
   border:1px solid black;
   background-color:blue;
}

iframe{
   margin: 5px;
   display:block; 
   width:100%!important; 
   height:100%!important;
}

#sidebar{
   position:absolute;
   right:0;
   top:102px;
   padding:0;
   margin-right:5px;
   margin-bottom:5px;
   width:250px;
   height:99%; /* works only if parent container is assigned a height value */
   border:1px solid black;
   background-color:yellow;
}

instructions

  • 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-10T07:08:07+00:00Added an answer on June 10, 2026 at 7:08 am

    Since their are little to no variables, this is easily solved by relying on position: absolute, without affecting flexibility.

    The HTML:

    <header class="header"></header>
    
    <div class="content">
        <iframe src="http://www.cnn.com/"></iframe>
    </div>
    
    <div class="sidebar"></div>
    

    The CSS:

    * {
        -moz-box-sizing: border-box;
        box-sizing: border-box;
    }
    
    .header,
    .content,
    .sidebar {
      position: absolute;
      border: 1px solid black;
    }
    
    .header {
        top: 5px;
        right: 5px; 
        left: 5px; 
        height: 80px;
        background: red;
    }
    
    .content,
    .sidebar {
        top: 90px;
        bottom: 5px;
    }
    
    .content {
        left: 5px;
        right: 260px;
    }
    
    .content iframe {
        width: 100%;
        height: 100%;
    }
    
    .sidebar {
        right: 5px;
        width: 250px; 
        background: green;
    }
    

    Take a look at it here: http://jsfiddle.net/joplomacedo/WBRCj/
    ​

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

Sidebar

Related Questions

I'm attempting to do what Scott Hanselman describes below: http://www.hanselman.com/blog/MixingRazorViewsAndWebFormsMasterPagesWithASPNETMVC3.aspx I have a Web
I'm attempting to layout my header (logo and navigation) so that the logo is
Attempting to get Spring internationalization working. I have used classpath:messages basename, created .properties files
Attempting/struggling to get registration and sign-up working within an active admin project. I have
I'm attempting to add Mercury editor and while modifying the layout for it, it
I am attempting to put several messages in a thread-like layout. To see the
I'm attempting a centered, two-column layout and I'd like to have horizontal rules in
i am attempting to get my android app to work on both phone type
I'm attempting to connect to the page using an HTTP Post. I do an
I am attempting to build a simple content management system using Twitter's Bootstrap for

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.