• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 80
  • Last Modified:

CSS border

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 ?


Allen in Dallas

<TITLE>Border Page</TITLE>

#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;
div.text {
 padding: 15px 15px;


<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>


Open in new window

Allen Pitts
Allen Pitts
1 Solution
David S.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 EngineerCommented:
Another way could be to use wrapper <div> tag for entire page, Use style attribute to define background, border, etc.
Allen PittsBusiness analystAuthor 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.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now