Solved

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

Posted on 2007-12-02
3
1,309 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
  • 2
3 Comments
 
LVL 28

Accepted Solution

by:
gamebits earned 500 total points
Comment Utility
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
Comment Utility
superb!
0
 
LVL 28

Expert Comment

by:gamebits
Comment Utility
Thanks for the points and the grade.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Hand when hover boostrap carrousel 6 31
Creating a slider 12 32
Box Model and Styling 12 19
Flexbox in CSS3 2 25
This article offers some helpful and general tips for safe browsing and online shopping. It offers simple and manageable procedures that help to ensure the safety of one's personal information and the security of any devices.
This article discusses four methods for overlaying images in a container on a web page
The purpose of this video is to demonstrate how to reset a WordPress password if you are locked out and cannot reset the password. A typical use would be if you cannot access the email to which WordPress would send the password recovery email to…
This Micro Tutorial will demonstrate how to add subdomains to your content reports. This can be very importing in having a site with multiple subdomains.

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now