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

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

0
Allen Pitts
Asked:
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.
0
 
Pravin AsarPrincipal Systems EngineerCommented:
Another way could be to use wrapper <div> tag for entire page, Use style attribute to define background, border, etc.
0
 
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.
0
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