Losing CSS formatting after publishing

User 602235 Photo


Registered User
4 posts

New to CSS but I have a page which displays, or rather displayed :(, in the HTML Editor as required. I've used FTP to publsih this and, again, it looks as expected in a browser.
However, when I have copied the html back from the website, the formatting is not as expected. Some images are there, some are not and I cannot seem to get them back with my limited knowledge of CSS. I cannot see any immediate differences in the html or css files.
Any ideas?
TIA
Bob
User 122279 Photo


Senior Advisor
14,633 posts
Online Now

Let us have a link to your site, and we'll take a look 'behind the scene'. :)

It could be something as simple as forgetting to upload the style sheet, uploading to the wrong folder compared with what you say in the link in the html files, using uppercase, spaces in file names or something, but we don't know until we can see it.
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com


User 38401 Photo


Senior Advisor
10,951 posts

Hiya Bob,

Got a link to your site? Also when you say you are copying the HTML back from the website, do you mean you are copying it from a web page? If so then you should paste that code into a text editor (not word or word pad, but notepad or notepad++) to strip any hidden code it may have copied with it.

Other than that we'd need to see the code on the site and if you could attach the html page that you have on your computer we can try to help you find what is wrong between them.
User 602235 Photo


Registered User
4 posts

Thanks for your prompt replies...
A little more work done on this.
The issue is with the HTML Editor, it appears, not the website.
When the pages are viewed on the website, they all appear as expected.
I am using FTP to copy the files directly from the website into a HTML Editor Project. When previewing or using the external preview, the pages are not displayed correctly. If I open the local HTML filepage directly from IE on my computer, all is well.
The webpage was originally a cut-down of the Ecologic Theme and I will admit to there being some CSS stuff in there that I don't yet understand. However, the difference between the way that the editor and IE display the pages, points to a problem somewhere.
If I edit the pages and re-publish them they are fine but it would be good (and expected, I guess) to be able to preview them in the editor.
I am going to create a test page so this will be easier to identify so, if you have any other thoughts in the meantime, let me know. Otherwise, I'll post more details once I have done the test page when I will be able to provide whatever support materials are required.
User 122279 Photo


Senior Advisor
14,633 posts
Online Now

Bob Cresswell wrote:
Thanks for your prompt replies...
A little more work done on this.
The issue is with the HTML Editor, it appears, not the website.
When the pages are viewed on the website, they all appear as expected.


It would surprise me a great deal if the HTML Editor is the culprit here. Usually it can handle uploads, downloads and displaying files ok. Could it be something with your installation? Or, I don't know how long you have been working with that programme, so could it be something that you haven't found out yet? (In that case we can help ;) )

Bob Cresswell wrote:

I am using FTP to copy the files directly from the website into a HTML Editor Project. When previewing or using the external preview, the pages are not displayed correctly. If I open the local HTML filepage directly from IE on my computer, all is well.


Sounds like a 'backwards' procedure. Or maybe I didn't quite understand. I would download the pages I need, pop therm in a folder and then create a project with them (Or actually, I probably wouldn't create a project. Jo Ann knows me, hehe!)
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com


User 602235 Photo


Registered User
4 posts

I am fairly sure its me and my lack of knowledge:)
Not sure I can explain why exactly the same file looks OK in the browser but doesn't display correctly in preview...
I'll be back...
Bob
User 122279 Photo


Senior Advisor
14,633 posts
Online Now

Bob, check a couple of things in the HTML Editor:
On the top menu bar, find Tools, then Preferences, and having the General tab open, make sure that your initial doctype is HTML5. Then go to the tab saying Browser testing, and see if the Internal preview is set to IE9, if it's not, change that. After clicking ok you need to restart the Editor.
When it is open again, open the file you are working on and see at the bottom, somewhat over to the right. There is a wee pic of a chain. If it has a red dot, then click on it to make it green.
See if this helps.

But as said, having a look at your files would help.
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com


User 602235 Photo


Registered User
4 posts

The initial doctype was set to HTML5.

Browser option was set to IE8. Setting this to IE9 resolved the problem.

However, I had found that the cause of this (with the IE8 setting) was the removal of:

<!--[if IE]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->

from the HTML that was created by the theme.

I did this because IE gave the 'running a script' warning message which I wouldn't want to present to my users.

I have noticed that this script is added if I create a new webpage and the first line of the HTML page is <!DOCTYPE html> (not HTML5) but from w3schools, I think this is probably right.

Many, many thanks for your time so far. I can move ahead now but an explanation of what has been happening would be welcomed as well as what the script does and how I can avoid the 'script' message.

Bob
User 122279 Photo


Senior Advisor
14,633 posts
Online Now

The script is there so that older versions of IE can understand html5. Not absolutely sure, but I think IE8 doesn't support much of html5. Are you still getting that script warning after you set the browser rendering as IE9?

And yes, the <!DOCTYPE html> is correct.
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com


User 38401 Photo


Senior Advisor
10,951 posts

Have to say once again though, a link to your site would help us help you a whole lot easier :)

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.