CSS border

Allen Pitts
Allen Pitts used Ask the Experts™
on
Hello Expert,

Found some CSS code to make a border for htm pages that adjusts
to the size of the window.
It works great in Firefox 37 and Chrome 41 but is jacked up
in Internet Explorer 8.

Is there some way to make this work for IE 8 ?

Thanks

Allen in Dallas

FireFox_and_Chrome
Border-Internet-Explorerer-8.gif
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<TITLE>Border Page</TITLE>

<STYLE>
#top, #bottom, #left, #right {
	background: #000080;
	position: fixed;
	}
	#left, #right {
		top: 0; bottom: 0;
		width: 15px;
		}
		#left { left: 0; }
		#right { right: 0; }

	#top, #bottom {
		left: 0; right: 0;
		height: 15px;
		}
		#top { top: 0; }
		#bottom { bottom: 0; }

 body {font-family: arial}

 div.blue {background-color: #000080; color: yellow;
 padding: 10px 10px;
 font-size:28px;
    }
div.text {
 padding: 15px 15px;
 font-size:16px;
    }
</STYLE>

</HEAD>

<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#000080" VLINK="#800000" ALINK="#FF00FF" BACKGROUND="?">
<div id="left"></div>
<div id="right"></div>

<div class="blue">Title Text</div>
<div class="text"> <!- begin text -->

Body text Body text Body text Body text Body text Body text Body text Body text Body text

</div> <!- end text -->
<div id="top"></div>
<div id="bottom"></div>

</BODY>
</HTML>

Open in new window

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Consultant & Challenge Subduer
Top Expert 2009
Commented:
That code is ancient.

Change the first line to the following which well tell browsers to use "standards mode":
<!DOCTYPE html>

Open in new window

Are you aware that the current version of IE is 11?

All of those attributes in the <body> tag are obsolete. CSS should be used instead.
Pravin AsarPrincipal Systems Engineer
Top Expert 2005

Commented:
Another way could be to use wrapper <div> tag for entire page, Use style attribute to define background, border, etc.
Allen PittsBusiness analyst

Author

Commented:
Yes I am aware that the latest version is 11. The page is being developed for a company that is not exactly an early adoptor.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial