Messages in display in Code...

User 3121808 Photo


Registered User
9 posts

Hello,

I am very new to working with HTML Coding.

In the Window I have the following message on 4 lines of code:

Discarding Unexpected </style> </head> <body>. Does this mean that this code is not seen by the system or do I manually have to remove it myself. Also I did try to copy/paste these message, but the system will not do this ?.

Thanking you in advance

Tony
A M Stephens (Electronically Signed)
User 122279 Photo


Senior Advisor
14,547 posts
Online Now

Difficult to say when not seeing the whole page code. It could mean that you already have that code that you quote, and then there is an extra set somewhere.
If you have the page with said code uploaded, you could let us have the URL. If not, you could zip up the page and attach it here.
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 3121808 Photo


Registered User
9 posts

Hi Inger,

I have Selected ALL the code in my HTML File, copied and pasted into a blank Notepad File and saved using the same file name.txt

I have attached this file.

Once again thank you for your perseverance.

Tony
Attachments:
A M Stephens (Electronically Signed)
User 122279 Photo


Senior Advisor
14,547 posts
Online Now

Hi, I got your file. That bit of code you mentioned initially can be deleted, as there was indeed a double set of those tags. There was also a tag missing; the end body tag at the bottom of the file. I have corrected it in the attached file.

I also found a couple of other things that you should correct.
First, the file name. You should always name your files without any spaces, so if your file is My Contact Page Dev 1, use either 'mycontactpagedev1.html' or 'my-contact-page-dev-1.html. Also, it will be easier for any end user if you use all lowercase. Some servers do make a difference with the cases.
Second, the <label> needs to have the end tag </label> Check you tags for Location.
Third, you are using a lot of 'nbsp;'. Remember that each of them has to end in a ; In your case, you seem to use them as fillings to get the input fields for your form lined up vertically. Why not give the class label a width instead?
Attachments:
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 3121808 Photo


Registered User
9 posts

Hi Inger,

Many thanks for your information, I will work through them in the coming days. Sadly this project is one of three. two are ongoing:

Voluntary IT Support for a local Aviation Museum - this is the one that I am redoing the Contact Form for. I setup a Website for them from Scratch 6 years ago.

Head of Radio Signalling for a Heritage Railway, again a volunteer. This uses my Amateur Radio Skills to provide Communication Links etc.

I thought that when I retired I would be able to take life at a slower pace, how wrong was I !!!

Regards,

Tony
A M Stephens (Electronically Signed)
User 122279 Photo


Senior Advisor
14,547 posts
Online Now

Tony wrote:
Hi Inger,

I thought that when I retired I would be able to take life at a slower pace, how wrong was I !!!

Regards,

Tony


I know exactly what you mean! ;) Good luck with your projects!
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 3121808 Photo


Registered User
9 posts

Hi Inger,

I should have started a new a new post, but this thread follows on from my last one to/from you.

Today, I have saved and rename the file without any spaces etc. Regarding the "nbsp" situation. I have not found any examples of applying a class label with a width, to build on for my project. Recently I found in the help section "How to Create a Style Sheet". First of all I could not find the CSS Button referred to in the text..I found it in the end from the Top Menu - Insert Style Sheet Items.

I gave it a go, but without any guidance on how to fill it it in, I managed some settings Fonts and text styles. Before I did these settings I removed the lines of code that had my "nbsp" etc so I was starting a fresh.

I would be grateful if you could give me some guidance on applying a class Label etc. Hopefully an easier way than trying to get to grips with the "Style Sheet Wizard".

Regards,

Tony
A M Stephens (Electronically Signed)
User 122279 Photo


Senior Advisor
14,547 posts
Online Now

I have tidied up your file and used CSS to regulate the distance to where the input fields appear. When you open the file, you will see that I have moved the form in from the left edge and created a max width of the page. You may not agree with that, and if you don't, just delete the class wrapper from the CSS and HTML. You may make changes to it if you want to keep it, for example, make it wider or narrower. Do that in the styles section at the top. The red border is there only to make the wrapper visible, you can delete the styles pertaining to the border.

One of the important styles is the 'display: inline-block'. Without it, the labels won't keep the width of 100px that they have been given.
In order to make the textarea responsive, I also set the width and height in the styles section. It can of course be changed.

I understand your struggle with the Style sheet wizard. 20 years ago I was trying to combat it myself and didn't get far. My approach to CSS was something like I learnt one property, then I went about writing a style for that and removed all the instances of 'html-css tags' from my document. For example, I used positioning tables back then and had to write the margin, padding and all the font styling into every table cell. It really was a torture! So that was one of the first things I learnt in CSS, and it saved me tons of work. Later I learnt some other CSS rules, and gradually I even understood how to make use of that Style sheet wizard ;)
Attachments:
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 3121808 Photo


Registered User
9 posts

Hi Inger,

Many thanks for your assistance and the file attached. I am curious on a couple of things:

I could not see where the Font was set and I see that there is still the use of &nbsp; for each of the "Label" lines of code. Regarding line 10, do I need to put a title in here or just leave it as it is?.

I will now place it in my Web Building program...preview on localhost and if everything is fine publish to the Museum's Development Website.

Once again thank as for your stirling efforts in helping me.

Regards,

Tony
A M Stephens (Electronically Signed)
User 3121808 Photo


Registered User
9 posts

Apologies for the typo errors - Last line should have read:

Once again thank you for your sterling efforts in helping me
A M Stephens (Electronically Signed)

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.