Copy link to clipboard
Copied
How do I show column numbers in code view? I've searched and can't find an answer. Im trying to fix errors that DW shows. Most of mine are Special Characters must be escaped : [ < ], I have no idea what that means.
Thanks
Alan
DW did not do this by itself.
The <html> tag needs to wrap the entire page, right now, your <head> section is outside of it, that's invalid.
The first line of the code needs to be a doctype declaration. The most current would be <!doctype html> which should then be followed immediately by your <html> tag, then the <head> section.
You're also still missing a space between your attributes.
Finally, you should also have a set of <body> tags that start immediately after your </head> and end just befo
...Copy link to clipboard
Copied
If this is in HTML characters like < have special meanings so if you are writing it so that it reads as "less than", then it should be encoded as < and that will print the less than symbol to the screen. The same practice goes for SQL statements that some characters need to be escaped in statements.
Copy link to clipboard
Copied
Ben
I'm not using it show less than. They are added automatically by DW. Look at this one which DW said Special Characters must be escaped : [ < ], :
Alan
<a href="https://clustrmaps.com/site/1atxb" title="Visit tracker"><img src="//www.clustrmaps.com/map_v2.png?d=T07gSUgrj58GY1mrkExH7SR-PtFW3GiUxWVI4LTUxHg&cl=ffffff" alt="" width="0" height="0"</a>
Copy link to clipboard
Copied
In this example your img tag is not closed with a ">" before your </a> so your markup is generating an error.
Copy link to clipboard
Copied
Ben
Okay I got that one. But DW is telling me in this one that I have no <td but I do. Also, how do I show the column numbers so I can see where the DW error appears?
Alan
<td style="border:2px solid #000A00;"height="25" colspan="3" align="center" bgcolor="#99CC66"><span class="style1"><a href="http://www.xxxxxx/Home_Page.html" class="stylelinks">HOME</a><strong> </strong><span class="stylelinks"><strong>|</strong></span><span class="style4"><span class="style5"> <a href="http://www.xxxxxxx/Contact.html" class="stylelinks">CONTACT ME</a></span></span></span></td>
Copy link to clipboard
Copied
I would suggest just running your code through the W3 validator and fixing everything because there are a lot of errors from what I am seeing ( http://validator.w3.org ). In this code you have 4 spans opening but only 3 closing. Also you have nesting issues and blank tags in that cell.
To give an example of how this could be cleaned up:
<td style="border:2px solid #000A00;height:25px;text-align:center;background:#99CC66;" colspan="3" class="stylelinks"><a href="#">HOME</a> | <a href="#">CONTACT ME</a></td>
Then for your CSS:
.stylelinks { font-weight: bold; } //Insert any other non-link styles here
.stylelinks a { text-transform:uppercase; font-weight:normal; ... } //Insert any other link styles here
Copy link to clipboard
Copied
Ben
Okay I'll do that, but there are 4 closed spans- see below. Also it has a <td and a </td> yet DW is throwing up an error. Did you see my question about how to show column numbers in Code View?
Thanks
Alan
<td style="border:2px solid #000A00;"height="25" colspan="3" align="center" bgcolor="#99CC66"><span class="style1"><a href="http://www.xxxxxx/Home_Page.html" class="stylelinks">HOME</a><strong> </strong><span class="stylelinks"><strong>|</strong></span><span class="style4"><span class="style5"> <a href="http://www.xxxxxxx/Contact.html" class="stylelinks">CONTACT ME</a></span></span></span></td>
Copy link to clipboard
Copied
If it's not coming from another error, earlier in your code, these two attributes need a space between them in your <td>...
"border:2px solid #000A00;"height="25"
...needs to be...
"border:2px solid #000A00;" height="25"
Copy link to clipboard
Copied
Jon
I've checked every <td> and made sure there was a closing </td> but it's still flagging it as missing. Oh well, I'll just get on with life and ignore it togther with the Special Characters Must Be Escaped errors.
Thanks
Alan
Copy link to clipboard
Copied
It may not be the <td> tag itself. The missing space I pointed out above will throw an error for sure and should be fixed. It's possible, with a lot of other errors on the page, that the validator simply can't give you the right answer to fix it anymore.
Ignoring structural defects in your code is a pretty terrible idea and will very likely come back to bite you when it comes to display problems in real browsers. Code needs to be right, or the display in a browser won't be. Browsers are programmed to guess what the developer meant to do when they run into code problems, but with too many problems in one page, they will ultimately fail and either render sections or the entire page incorrectly.
Copy link to clipboard
Copied
Jon
I fixed that error where there was a missing space in front of the word height. These are the only errors that DW throw up.
Alan
These are the errors that Validator shows (apart from the "USE CSS Instead errors).
Bad value https://fonts.googleapis.com/css?family=Archivo+Narrow|Mr+De+Haviland|Poiret+One|Quicksand|Varela|Op...for attribute href on element link: Illegal character in query: | is not allowed.
From line 2, column 1; to line 2, column 186
I don't know why it doesn't like the "|" because that separator came from GoogleFonts as the correct way to separate font styles.
No space between attributes.
At line 54, column 44
solid #000A00;"height="25" col
I fixed this yet it still shows as an error.
Copy link to clipboard
Copied
Alan,
1. Click in Code view panel.
2. Go to View > Code View Options > tick Line Numbers.
3. There is no option for column numbers & there never has been one.
Copy link to clipboard
Copied
Nancy
Okay, thanks but what's the point of the Validator or the internal DWcode showing the column locations of the errors?
Alan
Copy link to clipboard
Copied
It wasn't created by Adobe.
The Validation Window is actually getting its results from the W3C online validation tool.
Copy link to clipboard
Copied
Fixing code errors goes beyond the scope of this product forum. We're happy to answer your questions about Dreamweaver. But we can't back you out of careless coding mistakes.
Coding errors are inevitable. We all make them from time-to-time. Knowing how to fix your errors is an essential skill. If you can't do it, you need to review HTML basics.
https://www.w3schools.com/html/html5_intro.asp
Copy link to clipboard
Copied
Nancy
I hear what you're saying but I'm not the one adding the code errors. I very very rarely work in Code View. I work in Design View. As Ive said before, I set the style of the headings or the body and let DW add the code from my style sheet. Ive fixed all but these four errors in my template (and the two Special Characters must be escaped is most definitely a DW error thinking it's a > greater than symbol) so I'll see what errors DW adds as I paste in the body of my story. Im very careful not to copy directly out of my WP program so as not to copy over any formatting but copy and paste into TextEdit and them copy and paste from their.
Alan
Copy link to clipboard
Copied
Please show all of the code. That way we may be able to replicate the problem.
Copy link to clipboard
Copied
Okay Ben, here it is. I edited to maintain my privacy but it doesn't affect the four errors that I showed in my last post.
Alan
Copy link to clipboard
Copied
DW did not do this by itself.
The <html> tag needs to wrap the entire page, right now, your <head> section is outside of it, that's invalid.
The first line of the code needs to be a doctype declaration. The most current would be <!doctype html> which should then be followed immediately by your <html> tag, then the <head> section.
You're also still missing a space between your attributes.
Finally, you should also have a set of <body> tags that start immediately after your </head> and end just before the final; </html>
Copy link to clipboard
Copied
Jon
Okay, I added <html> on line 1.
I've gone through the code and I can't find where I need to add spaces between attridbutes. I would appreciate it if you please point them out.
If I add <!doctype html> on line 1, then there is a gap between the bottom of the image and the cell in which it resides - see screenshot. Ive tried and tried to fix it, but the only way I've found so far is to remove the <!doctype html>. If you have any suggestions then I would be grateful if you would let me know.
Having done all of the above changes, I'm still getting the Special Characters must be escaped.
Thanks for your help
Alan
Copy link to clipboard
Copied
Removing the doctype is never the right way to fix a display problem. That space is the browser default text-descender padding added to images. It's easily removed by adding "vertical-align:bottom" to the image's css.
Could you repost your current code?
Copy link to clipboard
Copied
Jon
The image is not in my stylesheet, its in HTML code. I tried making the cell align bottom, but that didn't work.
Alan
Edit. Fixed it, I added valign="bottom" to the image.
Copy link to clipboard
Copied
Well, I guess even a blind pig finds an acorn once in a while. Thanks for all your help.
Alan
Copy link to clipboard
Copied
If you don't want to target the image with a class or id, you can add the following to the top of your stylesheet...
img {vertical-align:bottom;}
Or within a style attribute of the image itself...
<img style="vertical-align:bottom;" src="yourimg.jpg">
Copy link to clipboard
Copied
Thanks Jon. I used the align="bottom" in the image style attribute and it worked fine. You can see from the green checkmark that all the errors have now been fixed.
Alan