Solved

Placing a "saved from url" comment in web page breaks CSS

Posted on 2007-12-02
3
1,322 Views
Last Modified: 2013-12-08
I have a simple example of HTML/CSS. Due to javascript being active in a web page, and having to run the file locally I HAVE to include the comment <!-- saved from url=(0014)about:internet --> at the top of my web page. However when I applied it, it broke my CSS.

1st code. Two divs, one centres the text and tries to border it. It manages to centre but does not contain border...see first code snippet

2nd code snippet straight below first, includes the <!-- saved from url=(0014)about:internet --> at the top. The page does not apply centre formatting and does have a border around it...
Confused, can anyone help?


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Skinning TabView</title>
<style type="text/css">
 
body {
	margin:0;
	padding:0;
}
 
div#centre {
width:85%;
border: 2px solid grey;
margin-left: auto;
margin-right: auto;
}
 
div#titleText{
font-weight: bold;
font-size: 1.5em;
}
 
</style>
 
</head>
 
<body>
 
<h1>Skinning TabView</h1>
<div id="centre">
<div id="titleText"> Title goes here<br /></div>
 
This text is supposed to be centred and have a border round it. More text to line break. More text to line break. More text to line break. More text to line break. More text to line break. More text to line break. More text to line break. More text to line break. More text to line break. More text to line break. More text to line break. More text to line break. More text to line break. More text to line break. More text to line break. More text to line break. More text to line break. More text to line break. More text to line break. More text to line break. More text to line break. More text to line break. More text to line break. More text to line break.
</div>
 
</body>
</html>
 
 
<!-- saved from url=(0014)about:internet -->
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Skinning TabView</title>
<style type="text/css">
 
body {
	margin:0;
	padding:0;
}
 
div#centre {
width:85%;
border: 2px solid grey;
margin-left: auto;
margin-right: auto;
}
 
div#titleText{
font-weight: bold;
font-size: 1.5em;
}
 
</style>
 
</head>
 
<body>
 
<h1>Skinning TabView</h1>
<div id="centre">
<div id="titleText"> Title goes here<br /></div>
 
This text is supposed to be centred and have a border round it. More text to line break. More text to line break. More text to line break. More text to 
 
line break. More text to line break. More text to line break. More text to line break. More text to line break. More text to line break. More text to 
 
line break. More text to line break. More text to line break. More text to line break. More text to line break. More text to line break. More text to 
 
line break. More text to line break. More text to line break. More text to line break. More text to line break. More text to line break. More text to 
 
line break. More text to line break. More text to line break.
</div>
 
</body>
</html>

Open in new window

0
Comment
Question by:Donnaa5dcp
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 28

Accepted Solution

by:
gamebits earned 500 total points
ID: 20391183
Try to put the comment after the doctype declaration.

Doctype must be the first line on an html document
0
 
LVL 5

Author Closing Comment

by:Donnaa5dcp
ID: 31412188
superb!
0
 
LVL 28

Expert Comment

by:gamebits
ID: 20391295
Thanks for the points and the grade.
0

Featured Post

WordPress Tutorial 1: Installation & Setup

WordPress is a very popular option for running your web site and can be used to get your content online quickly for the world to see. This guide will walk you through installing the WordPress server software and the initial setup process.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Citrix XenApp, Internet Explorer 11 set to Enterprise Mode and using central hosted sites.xml file.
Ever visit a website where you spotted a really cool looking Font, yet couldn't figure out which font family it belonged to, or how to get a copy of it for your own use? This article explains the process of doing exactly that, as well as showing how…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

622 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question