Expanding the navigation bar

HTML Source, Tables, CSS, JavaScript, and Embed/Object.

Moderators: BobCP, agsone, Neil Parks, gregtutor, Lem3

Re: Expanding the navigation bar

Postby cindy2007 on Mon Aug 03, 2009 12:56 pm

Error Line 38, Column 185: Attribute "hspace" exists, but can not be used for this element.
- Not allowed under a STRICT doctype. Replace it by styling with a CSS margin setting

How do I do this?

Error Line 131, Column 42: document type does not allow element "span" here; missing one of "dt", "dd" start-tag
Error Line 142, Column 5: end tag for "dl" which is not finished
- You've stripped out the contents of a <dl> tag leaving it empty of any of the tags that it must contain. It's redundant anyway!:
1. Double-click one of the three SCRIPT tags at the top of the sidebar
2. Right-click on the <dl> tag on the status line and select REMOVE TAG.

I did this but didn't see any <dl> tag. What could I be doing wrong?

Line 210, Column 43: ID "legal" already defined
Line 202, Column 42: ID "legal" first defined here
- IDs can only be used once on a page so these IDs should be a "class" instead. (You seem to have lost the CSS code from the stylesheet that must have related to the styling of these two paragraphs anyway, so the rules need to be re-created.)

How do I create a rule?

Line 211, Column 30: Attribute "target" exists, but can not be used for this element.
- Not allowed under a STRICT doctype. Remove it! (In any case, "target" has been a largely redundant feature since the advent of tabbed browsers. A visitor can now always choose whether to open any link so that it replaces the current page or shows separately. There's just no point any more.)

Firstly, how do I know what line and column something is? My lines are different and I don't know how to check columns.
Secondly, Should I erase all of the "targets" that I added for pdf/images? Even with tabbed browsers, if I erase it will someone leave the site when they open the PDF without even knowing how to get back?

Thanks again!
cindy2007
 
Posts: 95
Joined: Sun Jul 22, 2007 11:49 am

Re: Expanding the navigation bar

Postby gregtutor on Mon Aug 03, 2009 2:47 pm

Not sure which URL holds the latest version of the page. Certainly, some of the line numbers don't tie up with the version I put through validation...
cindy2007 wrote:
Error Line 38, Column 185: Attribute "hspace" exists, but can not be used for this element.
- Not allowed under a STRICT doctype. Replace it by styling with a CSS margin setting

How do I do this?
Rather than give you a step by step to adjust this one setting, you really need an introduction to the use of CSS.

Currently almost all your styling is done using the "drag-select-toolbar button" approach. This is so very bad. You might get away with it in a short word processing document, but now you are dealing with a web site, a potentially huge collection of files, and if there's to be any chance of later being able to make quick site-wide changes with a couple of clicks, then you must use appropriate techniques that allow this.

Using your current approach then every change of size of font or colour that you apply on this page would have to be changed individually. And should you change your mind about how the site is to look, then every other item on every other page would also need to be changed individually. But with CSS you make one change and it cascades through the whole site.

Work through my page at:
http://www.gregtutor.plus.com/webdesign/externalcss.html
I did this but didn't see any <dl> tag. What could I be doing wrong?
The page I'm now seeing only shows two "SCRIPT" tags at the top of the sidebar, above the search box. Try this instead. Right-click on one of those two tags. The status line should change to show:

<body><div id="page"><div id="sidebar"><ul><li><dl><span><script>

It is the <dl> in that lot you should right-click over and then choose "Remove Tag" from the menu.
How do I create a rule?
It was this question that convinced me I should not answer your first question. If using a template like this IT IS ESSENTIAL that you understand how it is built and how to amend it if you are not to get n a hopeless mess. You MUST learn the basics of CSS.
Firstly, how do I know what line and column something is? My lines are different and I don't know how to check columns.
Source View in KompoZer is a bit "broken". That is why I do not regard KompoZer as usable without the Handcoder extension installed. This allows you to use your preferred txt editor to examine and edit your code. A decent text editor will show you true line numbers and the column (it simply means the count of characters from the beginning of the line).
Secondly, Should I erase all of the "targets" that I added for pdf/images?
As you are using a template that uses a STRICT DOCTYPE, then to be valid code there can be no target attributes in your code, so yes, you must remove them all.
Even with tabbed browsers, if I erase it will someone leave the site when they open the PDF without even knowing how to get back?
You're asking about the state of competence of each of your visitors. It will depend entirely on the browser they use, what options are set in that browser, what clicking action the visitors uses, and more. Some may have chosen to allow their PDF reader to open within their browsers others will not (or not bothered to alter their browser or their PDF reader's defaults). All of that applies to any link, not jut those to external sites, PDF files, etc.

I take the somewhat purist stance that given that tabbed browsing has been around for long enough, everyone should now be familiar with it and be ready to open all links in a new tab, especially if the link indicates that it will take you to an external site. (I don't think I have done a left-click over any link in fifteen years. These days I always use wheel-click which, on my system - and most people's, opens any link under a new tab. Back in the days of Windows for Workgroups 3.11 I would right-click and choose "open in new window" when using a link).

For those still using 1995 techniques of web navigation there's always the Browser's BACK button. Surely everyone still remembers that? For those who pander to those still suffering 20th century thinking, you could downgrade the DOCTYPE to "TRANSITIONAL", which does still allow targets, but it really wouldn't be good practice as it will only cause you more hassle in the future. I only do it when I am absolutely forced to because of using certain kinds of "imported" code and scripts.
Greg Chapman
http://www.gregtutor.co.uk
Helping new users of KompoZer - but using BlueGriffon
gregtutor
Moderator
 
Posts: 3784
Joined: Wed Jun 20, 2007 8:25 am
Location: The Norfolk Broads, UK
Country: England (en)

Re: Expanding the navigation bar

Postby cindy2007 on Tue Aug 04, 2009 7:30 am

I read the info on css from your site that you suggested and it helped me very much. Thanks! As a result I managed to get from about 50 errors to only 4!

I few of the errors relate to the tags that you suggested that I erase. I have copied the list of errors below. Could I have done something wrong when I erased the tags in CSS?

Line 124, Column 31: document type does not allow element "script" here; missing one of "dt", "dd" start-tag
<script type="text/javascript"><!--✉
The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").

Line 132, Column 93: document type does not allow element "script" here; missing one of "dt", "dd" start-tag
…esyndication.com/pagead/show_ads.js">✉
The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").

Line 134, Column 5: end tag for "dl" which is not finished
</dl>✉
Most likely, you nested tags and closed them in the wrong order. For example <p><em>...</p> is not acceptable, as <em> must be closed before <p>. Acceptable nesting is: <p><em>...</em></p>

Another possibility is that you used an element which requires a child element that you did not include. Hence the parent element is "not finished", not complete. For instance, in HTML the <head> element must contain a <title> child element, lists (ul, ol, dl) require list items (li, or dt, dd), and so on.
cindy2007
 
Posts: 95
Joined: Sun Jul 22, 2007 11:49 am

Re: Expanding the navigation bar

Postby gregtutor on Tue Aug 04, 2009 7:55 am

All three of these errors relate to the empty set of <dl> tags that surround that script code that I mentioned earlier.

1. Open the page in KompoZer
2. At the top of the sidebar, right-click on either of the two SCRIPT tags that you see as the first items in the sidebar.
3. On the status line, right-click over the <dl> tag and select REMOVE TAG.
Greg Chapman
http://www.gregtutor.co.uk
Helping new users of KompoZer - but using BlueGriffon
gregtutor
Moderator
 
Posts: 3784
Joined: Wed Jun 20, 2007 8:25 am
Location: The Norfolk Broads, UK
Country: England (en)

Re: Expanding the navigation bar

Postby cindy2007 on Tue Aug 04, 2009 9:22 am

Thank you very much for all of your help! It is greatly appreciated!
cindy2007
 
Posts: 95
Joined: Sun Jul 22, 2007 11:49 am

Previous

Return to Advanced Design Q & A


Who is online

Users browsing this forum: No registered users and 1 guest