Jump to content
Killersites Community


Advanced Member
  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by Wickham

  1. Wickham

    Title for anchor tags

    I've seen several topics about whether to use the title="..." in anchor tags and people have different views. If I exclude the title like this:- Contents I presume that a screen reader for a blind person will read out "Contents", is that correct? If I include title like this:- Contents all browsers show a tooltip which I find ugly, but does a screen reader read out both "Contents" and "Main contents of this website"? How can I include extra information for a disabled person without showing the ugly tooltip? Is the best way to avoid using title but to increase the description between the and tags? That is also ugly because you get more words with the hover style which may be a different color and underlined. There was a discussion here http://forums.site-reference.com/topic/8601/How-much-Weight-does-title-anchor-carries/ where people couldn't make up their minds whether it is a good idea to have the title or not and some were thinking of SEO while others were thinking of accessibility.
  2. Wickham

    Html Or Xhtml? [Updated: 14 Sept. 2011]

    ...but lots of people are using HTML5 as it gives some extra benefits. When you use a validator you just get a warning Using experimental feature: HTML5 Conformance Checker. The validator checked your document with an experimental feature: HTML5 Conformance Checker. This feature has been made available for your convenience, but be aware that it may be unreliable, or not perfectly up to date with the latest development of some cutting-edge technologies. If you find any issues with this feature, please report them. Thank you. Personally, I am using HTML5 but I don't use all the new features and I check on several browsers and hand-held devices using Opera Mobile Emulator http://www.opera.com/developer/mobile-emulator which gives lots of mobile devices to check.
  3. Wickham

    Php Mail(); Function

    Here's another tutorial showing how to set up php.ini file to send emails from localhost on your computer: http://roshanbh.com.np/2007/12/sending-e-mail-from-localhost-in-php-in-windows-environment.html
  4. Wickham

    Html 5 Doctype

    This w3.org page http://www.w3.org/html/wg/drafts/html/master/Overview.html uses par 8.1.1 uses capitals but I cannot believe it make any difference to use lower case, apart from raising a validation error.
  5. Wickham

    Html 5 Video Not Working In All Browsers!

    Will this Safari tutorial help? http://developer.apple.com/library/safari/#documentation/AudioVideo/Conceptual/Using_HTML5_Audio_Video/AudioandVideoTagBasics/AudioandVideoTagBasics.html You have used <source src="serendipity_libtheora_008.ogv" type="video/ogg" /> <source src="serendipity.m4v" type="video/mp4" /> I use .oggv type="video.ogg" and I haven't noticed a problem, but I haven't used .m4v I just use .mp4 but you may be correct. This page is for Safari http://caniuse.com/#feat=mpeg4 This page is for all browsers http://caniuse.com/#feat=video so check each sub-feature link below the schedule
  6. Wickham

    Help with a simple menu?

    w3schools is a reasonably good tutorial for beginners but remember that even tutorials can be wrong. Look at the mistakes listed on http://w3fools.com/ w3schools was completely updated a year or two ago and has now got rid of the HTML 4.01 and XHTML 1.0 doctypes and uses the HTML5 doctype, but has kept the old HTML coding separate from the new HTML5 stuff. http://www.w3schools.com/html/default.asp You need to be aware that some elements were removed in HTML5, see http://www.w3schools.com/html/html5_new_elements.asp near the page bottom, and HTML5 is still in beta (officially hasn't been released yet but only minor changes are expected in future). The most important removed tags which many people still use (but shouldn't although browsers still seem to process them) are center, font, frame, frameset, noframes.
  7. Wickham

    Css Positioning Problems

    In addition to Eric's five solutions, here's another which is slightly different. In your solution at present each li tag is 16.666% wide so the space between Moloney Family and Media is smaller than between Media and Gallery. Item 4 on http://www.wickham43.net/dropdownmenus.php has no width for the li tags or for the whole ul tag so the li tags only use what they need and the spacing is equal padding. It does mean that the menu doesn't fill the whole width in a large window, but it always centers even if text in li tags is different. It uses two 50% positions, one positive and the other negative. If the window isn't wide enough, the right end tab(s) drop down, like your's do now.
  8. Wickham

    Traveling Animation

    Edit these: function fish2Swim() { document.getElementById("fish2").style.right = horizontal[fish2Position] + "px"; ++fish2Position; if (fish2Position == 49) fish2Position = 0; } <p><span id="fish2" style= "position:absolute; right:10px; top:100px"><img src="fish2.gif" alt="Image of a fish" /></span></p> I changed left to right. With my 1366px wide resoltion window, the left fishes only swim half way across before returning to the left, and the right fish swims in half the right side. If you want to merge them you will have to edit something else.
  9. Wickham

    Sending Form Information

    Essentially, you just have to add the mail function last, after the submission to your database. See if you can work it out from here to suit your code:- $result=MYSQL_QUERY("INSERT INTO villagehall (id, day, month, year,date,starttime, endtime, club, room, who, phone, email, message, book)". "VALUES ('NULL', '$day', '$month', '$year', '$date', '$starttime', '$endtime', '$club1', '$room' , '$who1', '$phone1' , '$email1' , '$message1', '$book')")or die( "<p><span style=\"color: red;\">Unable to select table</span></p>"); mysql_close(); mail( $email, "Village Hall booking", "$day/$month/$year $starttime to $endtime\r\n$room $book\r\n$club\r\n\r\n$replymsg", "From: $admin" ); header( "Location: $thankyouurl" ); } ?> The above is just part of the code. It's old mysql; I have updated my page to mysqli which is recommended now, but the code is a little bit more complicated as more than one parameter is often needed.
  10. Wickham

    Css Vs. Css3

    This is the official CSS3 page from w3.org http://www.w3.org/TR/css3-selectors/ which has changes from CSS2 in item 1.3
  11. Wickham

    divs, floats, absolute, relative, static,fixed

    Start with simple code to test out what each position can do. Forget static, hardly ever actually stated as it's the default. Position: relative and position: absolute are essential to learn and position: fixed is more or less self-explanatory except that it doesn't work in old IE browsers. See http://www.wickham43.net/divboxes.php and http://www.wickham43.net/threecolumns.php or Google div boxes. The float principle is often hard for beginners especially the need to clear floats. See http://www.wickham43.net/firefoxbackground.php because floats can affect the way a background does (or doesn't) show and the way following divs can move up beside or over floated divs if you don't clear the float. Flash is on the way out because it's bad for SEO (search engine optimisation).
  12. There could be three reasons: 1. Did you upload the images into the host server using the same directories and subdirectories as your folder and subfolder framework & names? 2. A conflict between lower and upper case. Your browser and WordPress may be case insensitive but your host's server is case sensitive so image.JPG is not the same as image.jpg so make sure the image filename and the img code in the HTML are the same case. 3. A path problem. Are the img codes relative like <img src="image.jpg" alt="Image 1" /> or absolute like <img src="http://www.your-domain.com/image.jpg" alt="Image 1" /> ? Absolute codes should work but relative codes are better so check the path, ie is it related to the C:\ drive on your computer (wrong) or are the paths to the folders and subfolders correct? The text you are seeing may be the alt text which displays if the image is unavailable.
  13. Wickham

    Replacing tables

    I hadn't noticed before, but you have a block element h3 inside an inline element "a" which is not allowed and could therefore get a different display from different browsers as they try to guess what the correct display should be. I gave the .column text-align: center; and made it bigger with a background to see what the effect was: .column { text-align: center; float: left; background: pink; padding: 10px; width: 500px; height: 300px; } h3 { font-weight: bold; background: lime; } p { background: yellow; } You could have no block elements at all, then the "a" tag and the img would both be centered by the text-align: center in .column and separated by a line break: <div class="column"> <a href="gallery1.htm" style="font-weight: bold;">Gallery #1</a> <br> <a href="gallery1.htm"><img src="images/square_j.jpg" width=300 height=200></a> </div> but the "a" tag has no top and bottom margin or padding so it's close to the img (it's bad practice to create more space by adding more <br> tags). OR You should have the "a" tag inside the h3 tag, then the img could be inside an "a" tag inside a p tag and then you have two block elements inside the container .column. <div class="column"> <h3><a href="gallery1.htm">Gallery #1</a></h3> <p><a href="gallery1.htm"><img src="images/square_j.jpg" width=300 height=200></a></p> </div> It appears that the text-align: center in .column is inherited by the text and img BUT notice that the h3 and p tag colors are full width although the "a" and img tags inside are centered. OR You could have the "a" tag inside the h3 tag, then the img could be inside only an "a" tag (just give the "a" tag a display: block; for and no p tag) and then you still have two block elements inside the container .column. <div class="column"> <h3><a href="gallery1.htm">Gallery #1</a></h3> <a style="display: block;" href="gallery1.htm"><img src="images/square_j.jpg" width=300 height=200></a> </div>
  14. Wickham

    Replacing tables

    It was badly worded by me. Div h3 and p are all block elements but I meant to refer to what you put inside them. You can have a few words of text then an img tag then a few more words of text and they will all be on the same line, running together, inside a block element, unless the img has a display: block style which breaks the inline state. <p>A few words <img src="image.jpg" alt="Image 1" /> a few more words.</p> See http://www.htmlhelp.com/reference/html40/inline.html and http://www.htmlhelp.com/reference/html40/block.html So if you want a line of text then an image on a separate line or with margins and padding you have to end the text in a block element and start an img tag with display: block; <h3>Heading text</h3> <img style="display: block; width: 300px; height: 200px; border: 2px solid black;" src="image.jpg" alt="Image 1" /> <p>Text in a p tag</p> The image can therefore be used in two ways.
  15. Wickham

    Replacing tables

    It's worth remembering that the img tag is an inline element tag and treated like a text unless it has display: block in the style. If the h3 and img tags were both inside a div which had text-align: center it would align both the text and the img.
  16. Wickham

    301 redirect

    I wouldn't be surprised if the control panel menu just creates a 301 redirect automatically. You just don't see the 301 code or know that it's happening.
  17. Wickham

    Removing space taken up by padding and margin

    Why has #msg got padding-top: 300px? Record added will move up if you delete that.
  18. Wickham

    Removing space taken up by padding and margin

    What happens if you add clear; both; to #msg (and possibly to #updateForm as well)? #msg { clear: both; float:right; padding-right:250px; padding-top:300px; font-size:15px; font-weight:bold; color:#C00; } #updateForm { clear: both; float:right; margin-top:120px; } You also need a doctype at the very top of the page, above the <html> tag. <!doctype html>
  19. Wickham

    Email \r\n sometimes not working

    I have an online form which sends two emails, one to the user and one to the admin. mail( $email, "Village Hall booking", "$club\r\n$room $book\r\n$day/$month/$year $starttime to $endtime\r\n$replymsg", "From: $admin" ); mail( $admin, "Village Hall booking", "$club\r\n$room $book\r\n$day/$month/$year $starttime to $endtime\r\n$who $phone $email\r\n$message", "From: $admin" ); The \r\n works in all cases except one which is the last in the second email between $email and $message but it does work between all the others including the $endtime and $replymessage in the first email. So in an email received by admin the last line is text from $who $phone $email $message all on one line. The only difference is that $email is an input type="text" whereas the $message is a textarea but I don't see why that should make a difference. The variables don't extract from a database, they are straight from the form post after remove_headers and stripslashes. Any ideas why this is? What's interesting is that I've just changed the order to mail( $email, "Village Hall booking", "$day/$month/$year $starttime to $endtime\r\n$room $book\r\n$club\r\n$replymsg", "From: $admin" ); mail( $admin, "Village Hall booking", "$day/$month/$year $starttime to $endtime\r\n$room $book\r\n$club\r\n$who $phone $message\r\n$email", "From: $admin" ); for the second email and the first three \r\n work to give a new line but there is no line break between $message and $email so $who $phone $message and $email are all on the same line, so it's definitely the last \r\n that doesn't want to work whatever variable comes after it. It's very odd. I decided to wrap up all the body part of the email in one variable $body for the second email $body=$day . "/" . $month . "/" . $year . ", " . $starttime . " to " . $endtime . "\r\n" . $room . ", " . $book . "\r\n" . $club . "\r\n" . $who . ", " . $phone . ", " . $email . "\r\n" . $message; mail( $email, "Village Hall booking", "$day/$month/$year $starttime to $endtime\r\n$room $book\r\n$club\r\n$replymsg", "From: $admin" ); mail( $admin, "Village Hall booking", $body, "From: $admin" ); and as before all the \r\n worked except the very last one between $email and $message (a few commas were added but that's irrelevant).
  20. Wickham

    Email \r\n sometimes not working

    That article is mainly about HTML emails but mine are just plain text where I wanted line breaks. I've seen some topics that say that Outlook does have problems with \r\n and now I've added a double \r\n\r\n to the last position before the $message $body=$day . "/" . $month . "/" . $year . ", " . $starttime . " to " . $endtime . "\r\n" . $room . ", " . $book . "\r\n" . $club . "\r\n" . $who . ", " . $email . " " . $phone . "\r\n\r\n" . $message; which adds a full line space instead of a line break. It adds a full line space in Outlook and webmail so at least it's consistent and in my case it's quite a good idea to have a full line space between short data like an email address and a message. What is strange is that other articles say that Outlook has a problem with all \r\n but in my case they all worked except in the one place when following an email address
  21. Wickham

    301 redirect

    There's more information here http://www.webconfs.com/how-to-redirect-a-webpage.php at Redirect old domain to new domain Check that Godaddy uses a Linux server and check any Godaddy help pages. Also http://www.squidoo.com/301#module156239770 which says "Secondly, when you 301 redirect an old domain to a new one, be aware that you'll have to keep paying for the annual domain renewal and server account of the old domain name." http://blog.hubspot.com/blog/tabid/6307/bid/7430/What-is-a-301-Redirect-and-Why-Should-You-Care.aspx
  22. Wickham

    301 redirect

    A 301 redirect in .htaccess will quite simply redirect someone who tries to open the old site in a browser to the new site. The old site can be deleted, edited or left as it is, no one will see it. You will have to copy over any files that are still valid to a new root directory for the new domain or if you just want the whole of the old site to remain unchanged, change the host server to point to the new domain and all the old files will stay as they are. I'm asuming that both domain names are hosted on the same server. You don't need a .htaccess file for every file, just one for the whole hosting service.
  23. Wickham

    Email \r\n sometimes not working

    The \r\n works in all cases except at the end of teh second mail function so I don't think using only \n will cure it. As a further experiment I added another \r\n like this:- $body=$day . "/" . $month . "/" . $year . ", " . $starttime . " to " . $endtime . "\r\n" . $room . ", " . $book . "\r\n" . $club . "\r\n" . $who . ", " . $phone . ", " . $email . "\r\n" . $message . "\r\n" . $who; mail( $email, "Village Hall booking", "$day/$month/$year $starttime to $endtime\r\n$room $book\r\n$club\r\n$replymsg", "From: $admin" ); mail( $admin, "Village Hall booking", $body, "From: $admin" ); so there are five \r\n in the second mail. The first three work as before but the last two don't work so I have day/month/year, starttime endtime room, book club who, phone, email message who when it should show day/month/year, starttime endtime room, book club who, phone, email message who I'm beginning to think that there is a limit of three \r\n and more than that don't work. Edit: after testing again I've discovered that the \r\n after $email doesn't work. I substituted $who for $email just before $message $body=$day . "/" . $month . "/" . $year . ", " . $starttime . " to " . $endtime . "\r\n" . $room . ", " . $book . "\r\n" . $club . "\r\n" . $who . ", " . $phone . ", " . $who . "\r\n" . $message; and all four \r\n worked. I also tested four \r\n in the first mail function which does not have $email and all four worked there, so for some reason $email blocks the operation of \r\n. I thought that swapping $phone and $email $body=$day . "/" . $month . "/" . $year . ", " . $starttime . " to " . $endtime . "\r\n" . $room . ", " . $book . "\r\n" . $club . "\r\n" . $who . ", " . $email . " " . $phone . "\r\n" . $message; so that there was a space after $email between $email and $phone and \r\n after $phone before $message would enable the last \r\n to work, but it didn't. However, as I said before, leaving out $email altogether does enable the fourth \r\n to work. SUCCESS EDIT 2: I've just used my online webmail system to view an email instead of using Outlook and all four \r\n worked properly, showing the message on a separate line as I wanted. So Outlook, for some reason, ignores \r\n when it occurs after an email address.
  24. Wickham

    HTML5 img sizing

    width="45%" or width="45px" are teh old method of styling and perhaps HTML5 is objecting to a deprecated method. You should use a class or id and separate styling in the styesheet for the width. Img tags used on their own need display: block for width, height, margin etc. to work. .imgright { width: 45%; display: block; border: 5px ridge; background: #655A46; padding: 2px; margin-left: 2%; float: right; } Delete width="45%" in the markup. Does that work?
  25. Wickham

    The Break Tag

    For addresses there is the address tag http://htmlhelp.com/reference/html40/block.html http://www.w3schools.com/tags/tag_address.asp but you have to style it how you want as it has deafult styling which you may not like. Most browsers render it in italic unless you change that.