Jump to content

scorpion

Member
  • Posts

    45
  • Joined

  • Last visited

Posts posted by scorpion

  1. CoffeeCup has the facility to change the Initial DOCTYPE.

     

    Look in Tools > Preferences > General > Initial DOCTYPE.

     

    I had a play with CoffeeCup for awhile but returned to Notepad++. I do like the way I can upload from within Coffeecup - saved having to open Filezilla but it seemed to screw a few things up in background like changing single apostrophes to a form that required

    & # 1 8 0 ;

    to validate. I prefer to type ...don't... to

    don& # 1 8 0 ;t

     

    Gee I can't even type the code for the single apostrophe without it converting it! (Just remove the spaces to see what I mean!)

    Cheers

  2. Thanks Wickham.

    Initially I had 8 errors with XHTML validation but after using lower case for TYPE, both instances of NOSCRIPT and changing <br> to br/> your code passed muster!

     

    I will now have a play to see if I can include the Envelope image and I will be away.

     

    Cheers!

     

    I have played with your code and now have this which works and validates to XHTML:-

    <div id="mail">
    <script type="text/javascript">
    <!-- // protected email script
    emailE='info'
    emailE=(emailE + '@' + 'irishtype3dna.org?Subject=Information%20Request') 
    document.write('<a href="mailto:' + emailE + ' ">' + '<img src="/images/envelope.jpg" alt="" width="61" height="31" border="0"  /> Mail: Information Request</a>')
    //-->
    </script>
    
    <noscript>
    <p>Email address protected by JavaScript.<br/>
    Please enable JavaScript to contact me.</p>
    </noscript>
    </div>
    

     

    One happy camper!!!

    I wonder if it was the commenting out of the javascript code that allowed the full validation?

  3. For what it's worth, I've also had javascript validation problems with a munged email address in HTML (but no error in XHTML) using code

    <div>
    
    <span class="px-small">
    Email: <script TYPE="text/javascript">
    <!--
    // protected email script
    emailE='my-name'
    emailE=(emailE + '@' + 'hotmail.com') 
    document.write('<a href="mailto:' + emailE + ' ">' + ' me ' + '</a>')
    //-->
    </script>
    </span>
    
    <NOSCRIPT>
    <span class="px-small">Email address protected by JavaScript.<br>
    Please enable JavaScript to contact me.</span>
    </NOSCRIPT>
    
    </div>
    

     

    where the error for HTML page is "end tag for element "A" which is not open" when it clearly has been opened.

     

    I've never found an answer and I've been tempted to use XHTML for those pages.

     

    Make sure you are using a text editor that doesn't add special functions to " or ' (like Word does) and experiment with ' instead of "

     

    Thanks Wickham.

    Initially I had 8 errors with XHTML validation but after using lower case for TYPE, both instances of NOSCRIPT and changing <br> to br/> your code passed muster!

     

    I will now have a play to see if I can include the Envelope image and I will be away.

     

    Cheers!

  4. Huh. I'm not sure how much more help I can offer here... To be honest, if this were my site, as long as it works in the browser and any visitors won't be affected, I wouldn't worry about it too much. Sometimes you have to pick and choose your battles when it comes to validation, and maybe this is one case where it's fine to have this element break validation.

     

    If anyone else has any ideas as to what might fix this error, please post. It's probably something simple that we're overlooking.

     

    Hmmm .. indeed! I tried the semicolons but the errors are still there. AND, I found the "" that the validator said were needed around the width="61" height="31" etc, actually caused the Envelope to disappear altogether! I am flying completely in the dark, and unless or until I can find a routine that I can 'lift', I will just stick to the HTML method as in my last post.

     

    Thanks anyway.

  5. As far as I understand that, this is an error with the HTML, not directly with the Javascript. What's the parent element of the <a> and <font> in the errors above? I've run into this before when I put an inline element within a <form> tag without a block element (div, p tag, etc) surrounding it. Any chance that this might fix it?

     

    Well I tried wrapping with a <p> ... </p> and with a <div> ... </div> but no joy.

    I had wanted to give some sort of protection against spammers harvesting email addresses, and the Javascript had worked fine in HTML Strict, but not, it seems in XHTML Transitional.

     

    For the moment at least, I have gone back to the usual HTML code with a corresponding id in the CSS for font and size of the text:-

    <div id="mail">	
    <p><a href='mailto:info@irishtype3dna.org?Subject=Information%20Request' target="_blank">
           <img src="/images/envelope.jpg" alt="" width="61" height="31" border="0"  /> Information Request</a></p>
    </div>
    

    This has validated to XHTML 1.0 Transitional. I will keep looking for a javascript routine that validates in XHTML.

     

    Cheers

  6. I wanted to use target="_blank" to have my external links open in a new tab. I found of course that this is only valid in XHTML so I have given all my webpages the following definition:-

     

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html lang="en-US" xml:lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
    

    After wading through and correcting all the errors that W3C Validation picked up, I am left with 2 that appear in a Javascript routine that I use to allow a reader to send me an email. I am not versed in the intricacies of Javascript. Can I have some help please?

     

    The routine is:-

    <script type="text/javascript">
    	//-- Mail Variables - 
    	emailname = "info"
    	emailserver = "irishtype3dna.org"
    	emailsubject = "?Subject=Information Requested"
    	// -- Show Envelope Here: 
    	document.write("<a href='mailto:" + emailname + "@" + emailserver + emailsubject + "' >");
    	document.write("<img src='images/envelope.jpg' width="61" height="31" border="0" alt="" />");
    	document.write("</a>");
    	// --  Show a Text Reference Here:
    	document.write("<font face='Monotype Corsiva' color='008000' size="3" >");
    	document.write("<a href='mailto:" + emailname + "@" + emailserver + emailsubject + "' >");
    
    	document.write(" Mail: Information Requested");
    
    	document.write("</a>");
    	document.write("</font>");
     </script>
    

    Errors are:-

     

    Line 399, Column 89: document type does not allow element "a" here

    …ite("<a href='mailto:" + emailname + "@" + emailserver + emailsubject + "' >");

     

    Line 403, Column 73: document type does not allow element "font" here

    document.write("<font face='Monotype Corsiva' color='008000' size="3" >");

  7. LOL Nice avatar... from the Ah-ha video is it not? Sort of marks your age... er... um... our age. biggrin.gif

    Avatar is from a drawing in a 1980s Classic Bike mag:-

    "Classic Motorcycling Legends" #12, p11, an article called "When I was a Lad" of a group of Rockers.

    I ride a 1961 Triumph Bonneville (as depicted) that I restored in 1986. My other passion :)

  8. I have a webpage that uses frames (for amazon links) which has always displayed correctly.

    With the latest FF update to 3.6.7, the frames do not show. Still displays correctly in IE 6, 7 and 8 and page validates correctly.

    The frames were floated to the left of the text. Space is still there but no content.

     

    Any thoughts?

    Site is ww w.irish type3dna.org/Bo oks.php (remove spaces)

  9. The thread on Google Fonts excited me to try text-shading on my website which looked brilliant using FF browser.

    My excitement was short-lived when I opened IE and only plain text was displayed. Using IE Tester, 6, 7 and 8 showed just plain text.

    I see text-shading is only supported in CSS3 CSS Properties and presumably IE is only CSS2 or CSS2.1

  10. I am also using JustHost. I am getting 50 individual visitors per day, about 6Mb/day, and the cpanel stats are great as are the video tutorials.

    $A118 ($US106) for 2 years. If someone signs up after hitting the ad on my page ww w.irishtype 3dna.org (delete two spaces), I get $40. It would pay for the hosting!

  11. You don't need the surrounding center div! My added hr tag didn't have it and it still centered, so I can't understand why your IE8 is different.

     

    I tried removing the centering div and it now works fine, so I went back to the css hr.bar and commented out the margin: 0 auto; that you had suggested and this is the element that does the centering. So! all is now well.

     

    Thanks again, Dennis

  12. I think I have found an answer.

    I need to add a 'center' div. It can be before the bar or surrounding it ... both work.

    <div class="center"></div><hr class="bar">
    
    or
    
    <div class="center"><hr class="bar"></div>
    

     

    It seems that there is a need to set up the centering and then the hr remembers it.

    I thought I tried this earlier, but at least it works now!

     

    Cheers, Dennis

  13. I've looked at your online page in IE8 (without using IE7 compatibility) and all the grey/blue hr tags are centered properly. edit:- I see that you've still got the image for the horizontal rule.

     

    I downloaded you code and added this just after your image:-

    <hr class="bar">
    

    and this to the stylesheet:-

    hr.bar { width: 200px; height: 4px; color: #eee; background-color: #eee; margin: 0 auto; border: none; }
    

     

    and the hr tag was centered, so the code does work in IE8.

     

    Wickham ... I am probably thick but this line is what I have as my 'bar' just above my copyright line at the bottom of the page.

    <hr class="bar">
    

     

    And the css stylesheet still contains:-

    hr.bar	{        /**    Blue Dividing Bar         **/             
    	width:200px;
    	margin:0 auto;
    	height:4px;
    	color:#506F89;
    	background-color:#506F89;
    	border:none;
    	} 
    

     

    So I don't see what you have done except change the color of the 'bar'. In my IE8 browser, this 'bar' is still left justified.

    Could you explain what you have changed from my existing code? Surely the order of elements in the hr.bar code does not matter?

  14. Okay, I have added the <hr class="bar"> to create the blue dividing line in my footer, appearing just above my copyright, name and "last updated" date.

    As such it will appear in all pages of ww w.irish type 3dna.org (remove 3 spaces)

    The blue dividing line below the copyright notice is:-

    <div class="center"><img src="images/bar.jpg" alt="" width="202" height="7"></div>

     

    css includes:-

     

    hr { /** A light full-width line **/

    text-align:center;

    }

     

    hr.bar { /** Blue Dividing Bar **/

    width:200px;

    margin:0 auto;

    height:4px;

    color:#506F89;

    background-color:#506F89;

    border:none;

    }

     

    I do see that align is deprecated in HTML4, and yet the page still validated! Shouldn't deprecated items at least receive a caution?

     

    In IE8 the upper line justifies left, but of course the compatibility button centers it again.

  15. I have, with help from this forum, developed my website using Notepad++ to display correctly with FF IE6 and IE7. I have made a point of validating all my pages to HTML4 Strict.

    ww w.irish type3 dna.org/ (remove 3 spaces)

     

    Yesterday I saw my website rendered in IE8 for the first time, and I was appalled!

    Two problems were overcome quickly but the following, while I was able to find a workaround, has me wondering what gives?

     

    I use a horizontal dividing bar between sections on my page, centered. Code as follows:-

     

    CSS

     

    hr { /** A light full-width line **/

    text-align:center;

    }

     

    hr.bar { /** Blue Dividing Bar **/

    width:200px;

    height:4px;

    color:#506F89;

    background-color:#506F89;

    text-align:center;

    border:none;

    }

     

    HTML

     

    <hr class="bar">

     

    This displayed centered in FF, IE6 and IE7 but left justified in IE8.

    As my centering class works fine for images and tables, even with IE8, I tried that.

     

    CSS

     

    .center {

    text-align:center;

    }

     

    HTML

     

    <div class="center"><hr class="bar"></div>

     

    But this was no better.

    So I have taken an image of the bar and found the following works in IE6, IE7, IE8 and FF.

     

    <div class="center"><img src="images/bar.jpg" alt="" width="202" height="7"></div>

     

    This solution validates correctly, as did the original, so why does IE8 not respond the same as IE7 and FF?

  16. Well that gets rid of the <body> and </html> errors but when I drop in one of Amazon iframe links I get plenty of other errors

     

    www.irishtype3dna.org/test2.php

    or

    www.irishtype3dna.org/Books.php

     

    The later is the actual page that I am trying to set up without errors.

  17. Hi All - back again!

     

    I need to use DocType Frameset for a page that will carry Amazon links. They insist on using <iframe>

     

    Problem is trying to validate the page. A stripped down page with no content can be seen here.

    www.irishtype3dna.org/test2.php

     

    As you will see, when I try to validate, I get:-

    <body> document type does not allow element "BODY" here

    and

    </html> end tag for "HTML" which is not finished

     

    Any clues?

     

    html code is

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">

     

    <html>

    <head>

    <title>Validation Test</title>

    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

    <link href="IrishTypeIII.css" rel="stylesheet" type="text/css">

    </head>

     

    <body>

    <div id="container">

    <div id="content">

    </div>

    </div>

    </body>

    </html>

  18. I have added a clock display routine which is working correctly, however when I validate I have an error.

     

    I have a statement in the head of the page:-

     

     

    And my routine is at clock.js of course

     

    The suspect code in the body is:-

     

     

    The validation returns with:

    1. Error Line 76, Column 32: required attribute "ACTION" not specified

     

    [/u][/color]

     

    The attribute given above is required for an element that you've used, but you have omitted it. For instance, in most HTML and XHTML document types the "type" attribute is required on the "script" element and the "alt" attribute is required for the "img" element.

     

    Typical values for type are type="text/css" for

     

    Any suggestions for this validation error?

     

    Regards

  19. While a site may display correctly in FF or IE7/8, it can 'step' in IE6 where the content of a div displays below another rather than alongside.

     

    Stepping can occur with a two or three column website where the width of one column is not specified so as to allow it to spread to the full width of the monitor irrespective of resolution.

     

    From various tutorials, comments and trial and error I have found the following is needed:-

     

    1. Have an overall container div where width is 100% and a line-height of 0px is specified. Within it are your two or three column divs.

    2. Left div has a specified width, a specified line-height and floats left

    3. Right div (if used) has a specified width, a specified line-height and floats right

    4. The Center div has left and right margins sufficient to keep away from the side divs and a specified line height. Absence of a width allows the div to expand to take up all the space available at the resolution of the viewing monitor.

    5. A height is not needed for any div to be displayed correctly in FF and IE7 as the divs expand vertically to contain the content. However in IE6 the absence of a height in the center div causes the stepping problem. The content is stepped below the side divs and displayed there. (Not good)

    6. If a height is specified in the center div, then in FF and IE7, the excess content is cut off and not displayed. (Not good)

    7. If a height is specified in the center div, then IE6 will display correctly alongside the side divs, (that is no stepping), and it sees the height as a minimum and will happily expand past the specified height to display all the content of the page.

    8. So a conditional statement must be put in the header of each page with a height just for IE6.

     

    These statements need to be incorporated in the css and html to avoid stepping:-

     

    main.css

     

    #container {

    width:100%;

    line-height:0px;

    }

     

    #left {

    float:left;

    width:150px;

    line-height:100%;

    }

     

    #right {

    float:right;

    width:130px;

    line-height:100%;

    }

     

    #content {

    margin:20px 190px 0 190px;

    line-height:120%;

    }

     

    The html should contain after the stylesheet statement and just before the :-

     

     

    The height can be set an any suitable figure or even 1%

     

    I trust this will help others with a 'stepping' problem.

     

    Cheers ...

×
×
  • Create New...