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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T22:11:07+00:00 2026-05-20T22:11:07+00:00

Problem: I am currently creating a webpage layout using divs and css rather than

  • 0

Problem:

I am currently creating a webpage layout using divs and css rather than an HTML table layout. I want, of course, for this to be able to operate across all major browsers.

I have a pane for a banner, which has a floated menu over the left portion of it. The problem is that if the banner is too wide for the space provided, it jumps to a space below the menu (where it is wider) and takes all of the pages content with it.

Attempted solutions:

The obvious solution is to use the “overflow: hidden” property in my css. The problem is that this doesn’t work in IE. I read that this is because I have it positioned relatively (which is true), but I don’t see any way around using relative positioning in this case. I must keep it.

I also read that you could set the width of the pane to something besides the default, and then the “overflow: hidden” property would take effect. This DOES solve the problem in IE (setting width to 100%), but creates a problem in chrome (and potentially other browsers as well) where the alloted space for the banner is too wide for the page, and then chrome behaves the same way IE had originally – pushing the banner to the bottom of the page. This workaround could work, but I would need to define the width value as “100% – menuWidth” since there is a menu over the left side. I tried this:

style="width:expression(document.compatMode=='CSS1Compat'? document.documentElement.clientWidth-(Menu Width goes here)+'px' : body.clientWidth-(And here too)+'px');"

But using the expression doesn’t appear to enable the “overflow” property, even though directly setting the width a simple value does.

EDIT: At request I have attached my code.

HTML:

    <div id="ControlPanel" runat="server" class="contentpane" align="center"></div>
    <div id="Link" runat="server" align="right" onclick="location.href='address.html';"></div>
    <div id="Header" runat="server" class="header" align="right"></div>
    <div id="Links" runat="server" class="header" align="center">LINKS</div>
    <div id="Search" runat="server" class="skingradient" align="right">[SEARCH]</div>
    <div id="LeftPane" runat="server" class="leftpane" align="left">[USER]</br>LEFT</div>
    <div id="TopPane" runat="server" class="toppane" align="left"><img src="image.jpg" alt="" /></div>
    <div id="RightPane" runat="server" class="rightpane" align="center">RIGHT</div>
    <div id="ContentPane" runat="server" class="contentpane" align="center">CONTENT</div>
    <div></div>
    <div id="BottomPane" runat="server" class="bottompane" align="center">BOTTOM</div>
    <div id="Footer" runat="server" class="skingradient" align="center">[COPYRIGHT]</div>

</body>
</html>

CSS:

#Search
{
    position: relative;
    top: -20;
    background-color: transparent;
    z-index: 1;
}

#Header
{
    height: 77px;
    background-color: #0860A8;
    background-image: url(ImagePath.gif);
    background-position: right;
    background-repeat: no-repeat;
    border-bottom: 1 solid white;
}

#Links
{
    background-color: #E6E6E6;
}

#TopPane
{
    border-top: 1 solid #0860A8;
    position: relative;
    top: -20;
    overflow: hidden;
}

#LeftPane
{
    float: left;
    position: relative;
    top: -20;
    width: 200px;
    height: 100%;
    background-color: #E6E6E6;
    border-right: 1 solid #0860A8;
}

#ContentPane
{
    position: relative;
    top: -20;
    width: 100%;
    height: 100%;
    background-color: Green;
    z-index: -1;
}

#RightPane
{
    z-index: 0;
    position: relative;
    top: -20;
    height: 100%;
    float: right;
    width: auto;
    background-color: Red;
    max-width: 40%;
    width:expression(document.compatMode=='CSS1Compat'? document.documentElement.clientWidth*2/5+'px' : body.clientWidth*2/5+'px');
}

The color coding is to allow for easy previewing and editing of the site.

  • 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-20T22:11:07+00:00Added an answer on May 20, 2026 at 10:11 pm

    I eventually hacked a solution that implemented slightly different styling for IE browsers.

    IE has something called conditional comments, and has a ‘comment’ tag. Neither of these are recognized by other browsers, and are both simply passed over. The conditional comments take the following form:

    <!--[if IE]> DO THIS <![endif]-->
    

    Since it has the same structure as a typical comment (<!– Commented code –>) it is passed over by all browsers besides IE, which apparently parses all comments looking for certain statements.

    The comment tag:

    <comment> HTML comment </comment>
    

    This is recognized as a comment by IE, and is passed over, but other browsers just skip the unrecognized <comment> tag and process the line of code contained inside normally.

    So my solution to this problem then since I could get IE to work one way, and other browsers another, was to place the HTML solution inside conditional comments:

    <!--[if IE]><div id="TopPane" runat="server" class="toppane" align="left" style="width: 100%; overflow:hidden;"><img src="i5Banner.jpg" alt="" /></div><![endif]-->
    

    and the solution for the remaining browsers inside the HTML ‘comment’ tags:

    <comment><div id="TopPane" runat="server" class="toppane" align="left"><img src="i5Banner.jpg" alt="" /></div></comment>
    

    This way I could treat IE browsers separately from other browsers. It may look ugly, but IE has apparently supported it through all IE versions and it causes no harm when encountered by other browsers, so I think I can consider it a safe and stable solution if nothing else is available.

    I believe that this may offer a way around many of IE’s other problems and idiosyncrasies.

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

Sidebar

Related Questions

I'm currently creating a very small form on my homepage using HTML and JavaScript.
i'm currently experiencing a little problem. I'm using nhibernate with around 40 entities mapped
I'm currently wrestling with an Oracle SQL DATE conversion problem using iBATIS from Java.
I have the following problem using subversion: I'm currently working on the trunk of
I'm currently in the process of creating a three row layout, nothing too difficult
I'm currently creating an alarm. I use NSTimer to schedule my alarms. My problem
I'm currently facing a performance problem with creating POCO objects from my database. I'm
I am currently running into a problem where an element is coming back from
I'm currently having a problem with a ShoppingCart for my customer. He wants to
I am currently faced with a difficult sorting problem. I have a collection of

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.