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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T14:25:28+00:00 2026-05-14T14:25:28+00:00

My background is in WinForms programming and I’m trying to branch out a bit.

  • 0

My background is in WinForms programming and I’m trying to branch out a bit. I’m finding cross-browser issues a frustrating barrier in general, but have a specific one that I just can’t seem to work through.

I want to display an image and place a semi-transparent bar across the top and bottom. This isn’t my ultimate goal, of course, but it demonstrates the problem I’m having in a relatively short, self-contained, code fragment so let’s go with it.

The sample code below displays as intended in Chrome, Safari, and Firefox. In IE8, the bar at the bottom doesn’t appear at all. I’ve researched it for hours but just can’t seem to come up with the solution.

I’m sure this is some dumb rookie mistake, but gotta start somewhere. Code snippet…

<!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>
<script type="text/javascript" language="javascript">
</script>
<style type="text/css">
    .workarea
    {
        position: relative;
        border: 1px solid black;
        background-color: #ccc;
        overflow: hidden;
        cursor: move;
        -moz-user-focus: normal;
        -moz-user-select: none;
        unselectable: on;
    }

    .semitransparent
    {
        filter: alpha(opacity=70);
        -moz-opacity: 0.7;
        -khtml-opacity: 0.7;
        opacity: 0.7;
        background-color: Gray;
    }
</style>
</head>
<body style="width: 800px; height: 600px;">
<div id="workArea" class="workarea" style="width: 800px; height: 350px;
    left: 100px; top: 50px; background-color: White; border: 1px solid black;">
    <img alt="" src="images/TestImage.jpg" style="left: 0px; top: 0px; border: none;
        z-index: 1;" />
    <div id="topBar" class="semitransparent" style="position: absolute;width: 800px;
        height: 75px; left: 0px; top: 0px; min-height: 75px; border: none; z-index: 2;" />
    <div id="bottomBar" class="semitransparent" style="position: absolute; width: 800px;
        height: 75px; left: 0px; top: 275px; min-height: 75px; border: none; z-index: 2;" />
</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-14T14:25:28+00:00Added an answer on May 14, 2026 at 2:25 pm

    You are self-closing a div tag, which is not allowed to be self-closed.

    You must close the div tag like this: </div>.

    Some browsers will support stupid mistakes like these, and attempt to close the tags for you. IE, on the other hand, doesn’t.

    Try this:

    <!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>
    <script type="text/javascript" language="javascript">
    </script>
    <style type="text/css">
        .workarea
        {
            position: relative;
            border: 1px solid black;
            background-color: #ccc;
            overflow: hidden;
            cursor: move;
            -moz-user-focus: normal;
            -moz-user-select: none;
            unselectable: on;
        }
    
        .semitransparent
        {
            filter: alpha(opacity=70);
            -moz-opacity: 0.7;
            -khtml-opacity: 0.7;
            opacity: 0.7;
            background-color: Gray;
        }
    </style>
    </head>
    <body style="width: 800px; height: 600px;">
    <div id="workArea" class="workarea" style="width: 800px; height: 350px;
        left: 100px; top: 50px; background-color: White; border: 1px solid black;">
        <img alt="" src="images/TestImage.jpg" style="left: 0px; top: 0px; border: none;
            z-index: 1;" />
        <div id="topBar" class="semitransparent" style="position: absolute;width: 800px;
            height: 75px; left: 0px; top: 0px; min-height: 75px; border: none; z-index: 2;" ></div>
        <div id="bottomBar" class="semitransparent" style="position: absolute; width: 800px;
            height: 75px; left: 0px; top: 275px; min-height: 75px; border: none; z-index: 2;"></div>
    </div>
    </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

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.