Jump to content
Killersites Forums

Wickham

Advanced Member
  • Posts

    1,114
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by Wickham

  1. If the html file opens in IE, Chrome or Firefox it should open in Opera. Try right click.. Open With.. Opera
  2. First and very importantly, DON'T save from a Word file as Word carries over unwanted formatting to some characters like " and ' . Use Notepad for writing code or Notepad++ or special text editing program or save from Word into Notepad first which should destroy the unwanted hidden formatting. Wordpad is another alternative, but I use Notepad and that's OK. Save your files with .html or .htm extension (.html is more common than .htm) or save with .php extension if you have PHP code on the page that will need server processing (unlikely if you are a beginner). Make sure when you save your files that you Save As: Type: All Files (*.*), not Text Documents (*.txt), and also use Encoding ANSI. Then check in your file list eg Windows Explorer that the file has been saved as myfile.html and not myfile.html.txt as sometimes the .txt gets added automatically and you don't want that. Use index.html for your home page as when a user just types in www.your-domain-name.com the server will automatically look for a file called index.html (or index.htm or index.php). When you want to look at a file called index.html or myfile.html on your browser, just double click the filename in the list and it should open up in the browser after processing the html code. If you want to edit the file in Notepad, use right click Open with Notepad. If you have progressed to stylesheets, these files should be written in Notepad (or another special text editor) and saved with .css extension (like my-style.css) and a link given in the head section of every html page like:- <link rel="stylesheet" href="my-style.css" media="all" type="text/css">
  3. No, you can't assume that all users will have IE activeX enabled, but most do. For important parts of a website it's probably safer to use an id or class and avoid the new html5 sections.
  4. The new HTML5 tags like section, aside, footer aren't supported by older IE versions unless you use a javascript shiv or shim file. Look at this page http://www.wickham43.net/html5.php and include <!--[if lt IE 9]> <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> in your head section and make sure that ActiveX is enabled in older IE versions.
  5. include/common.inc.php...webpage cannot be found. Should it have two extensions .inc and .php ?
  6. Yes, if it's already in the body style there's no need to repeat it. Font-weight can be anything from 100 to 900 http://www.w3.org/TR/CSS2/fonts.html#font-boldness and the default weight for the bold style might not suit the font you are using, some need a light "bold" some need a heavy "bold" so you could either style the h1 tag with a suitable font-weight instead of just bold or style a <b>...</b> tag which would then apply the same font-weight to any tag where it was used. So you have options on how to code font-weight.
  7. Your post above has <div id="menu"> <ul> <li><a href="index.html">HOME</a></li> <li><a href="2ColumChefDiplomaCourse.html">CHEF DIPLOMA COURSE</a></li> <li><a href="metropolisTokyo.html">METROPOLIS TOKYO</a></li> <li><a href="tciAdvocate.html">TCI ADVOCATE</a></li> <li><a href="location.html">LOCATION</a></li> <li><a href="inquire.html">INQUIRE</a></li> </ul> </div> which does show as HOME CHEF DIPLOMA COURSE METROPOLIS TOKYO TCI ADVOCATE LOCATION INQUIRE in the online page, so if you have a different display from your local page you've got your files muddled and perhaps you need to download from the host's server if that is the correct file and overwrite the file on your computer. I also notice that in the post above you have <title>2ColumChefDiplomaCourseFinal</title> which will show as 2ColumChefDiplomaCourseFinal in the browser top title bar which is nonsense but the online page shows Tokyo-chef-institute.com from the title tag which is obviously better, so perhaps your online page is the correct one.
  8. Wickham

    MAMP setup

    If you want to send from MAMP, have a look at this tutorial:- http://roshanbh.com.np/2007/12/sending-e-mail-from-localhost-in-php-in-windows-environment.html Find php.ini in the MAMP folders and edit carefully (save a copy of the original). Note that it says "Note : Some smtp server verifies the email address of the sender so the email address which is in the place of “sender@sender.com” should be a valid and existing email address otherwise mail might not be sent to the “you@yourdomain.com”." For your first tests, send From your own domain To your own domain because if the "From" part of the email has a strange domain it may be viewed as spam because emails sent from a different domain name from your own looks like a problem and eventually you will be blocked. It happened to me and I had to phone to get unblocked.
  9. Here's one that is pure CSS:- http://www.cssplay.co.uk/menus/slide_definition.html'>http://www.cssplay.co.uk/menus/slide_definition.html I expect that there are others on the CSSplay menu page http://www.cssplay.co.uk/menus/ Look at the source code and copy from the head section style tag and the part of the html markup for the menu.
  10. Yes, I knew what to do but rushed off my reply too quickly. Position: absolute divs must have position: relative; in the parent so #wrapper needs to be:- #wrapper { width:1050px; margin:0 auto; position: relative; }
  11. Also, looking at the 2ColumChefDiplomaCourse.html page, you have a style #wrapper { width:1050px; margin:0 auto; } but that div is missing in the html markup, so add it:- <body> <div id="wrapper"> <div id="Layer2" style="position:absolute;........etc. .................. <p align="center" class="style51"> </p> </div> </div><!--end of #wrapper--> </body> </html>
  12. I don't think it's necessary to clear your cache after every upload, although that should get you the latest version of your page. You should get the latest page by using CTRL + Refresh which forces an full download. It's more likely to be a delay at your hosting service. It's also possible that your ISP is caching pages and serving you from its cache instead of getting the updated version. I'm not sure whether CTRL + Refresh solves that problem.
  13. MySQL is often used with PHP and you can't test PHP on your computer unless you upload everything to your server or unless you install Apache server and PhpMyAdmin on your computer to test locally. I use WampServer http://www.wampserver.com/en/ but you can also use XAMPP, both for Windows PCs. Both give you MySQL and PhpMyAdmin so that you can test locally. PhpMyAdmin will give you access to MySQL. Use a tutorial like http://www.w3schools.com/php/default.asp or http://www.tizag.com/phpT/index.php for PHP and http://dev.mysql.com/doc/refman/5.0/en/tutorial.html for MySQL
  14. Wickham

    PHP concatenation

    I am intending to use \r\n in a concatenated variable in an email function but I thought I would test it first. Why should it work in an email function but not in an echo statement? Would it make any difference if it was a plain text email or if I included these headers $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=utf-8' . "\r\n"; to make an html email? Note that it's used in the headers code, but of course that doesn't print out.
  15. Wickham

    PHP concatenation

    I found this code on php.net page http://php.net/manual/en/function.mail.php <?php // The message $message = "Line 1\nLine 2\nLine 3"; // Send mail('caffeinated@example.com', 'My Subject', $message); ?> but when I test with an echo statement like this:- <?php $message = "Line 1\nLine 2\nLine 3"; echo "$message"; ?> in WampServer2 there aren't any line breaks. Why Not? Has php.net given a wrong example? How can I get \n or \r\n to create a line break from a variable? I really want to concatenate several variables like:- $name = "Name"; $email = "Email"; $message = "Message"; $messagebody = $name . "\r\n" . $email . "\r\n" . $message; echo "$messagebody"; but there aren't any line breaks, it's all on one line. How do I make \r\n work?
  16. http://www.killersites.com/university/ http://www.w3schools.com/php/php_intro.asp http://www.tizag.com/phpT/
  17. First of all, I think you should move away from framesets and frames which are intensely disliked by web developers and are bad for SEO. They are almost completely out of date. Use divs and use position: fixed; bottom: 0; for the footer or use a "sticky footer" http://www.cssstickyfooter.com/ However, if you want to continue with the frames, you could try a conditional comment which only targets IE7 with a higher bottom frame (say 10%) and put the conditional comment in the frameset file. I've no idea whether this will work as I've never put one in a frameset, but it might. See http://www.javascriptkit.com/howto/cc2.shtml for conditional comments. Edit: I've just done a quick test with this code whick makes the bottom frame higher only in IE7:- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd"> <html> <head> <meta name="keywords" content="Wickham, HTML, CSS"> <meta name="description" content="HTML and CSS Tutorial with examples"> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> <title>Framesets</title> </head> <frameset rows="93%, 7%"> <!--[if ie 7]> <frameset rows="83%, 17%"> <![endif]--> <noframes><body><p>Your browser doesn't support frames</p></body></noframes> <frame src="collieindex120119.html"> <frame src="kon120126.html" name="footer"> </frameset> </html> There does seem to be some spare space at the bottom of the IE7 window. The 83% and 17% don't use 100% of the height. I've tested on a IE7 computer and it's the same as using an IE9 computer with IE7 development tools so I think it's an IE7 quirk. <frameset rows="83%, *"> has the same result.
  18. Have you tried Cbox http://www.cbox.ws/ or Skype?
  19. body { background: url(images/bodybg.png) center top no-repeat fixed; font-family: Tahoma, Geneva, sans-serif; }
  20. If you have several files called homepage.html or index.html and several stylesheets called style.css, the best thing to do is to set up sub-folders inside your test folder called test1, test2 etc. or name the sub-folders by date test2feb, test3feb etc. then you keep the correcrt stylesheet with the correct index or home page. If you have them all in the same test folder you will be duplicating some filenames and get the wrong stylesheet operating with them.
  21. In addition to what Ben said, make sure you have a doctype at the top of your html file, before the <html> tag from here:- http://www.w3.org/QA/2002/04/valid-dtd-list.html as IE seems to be more affected by a missing or incomplete doctype than other browsers. I suggest that you get it right in Firefox (which you seem to have done) as IE differences can be sorted if necessary with a conditional comment that only IE will apply. So you can choose all IE versions or just a particular version and apply different styles just for that. See http://www.javascriptkit.com/howto/cc2.shtml but this can usually be avoided if you have a doctype and code correctly.
  22. Your php file code is very incomplete. Go back to where you got it from and check. It should start with <?php and end with ?> but I expect that there is more missing at the beginning. Also, ereg is deprecated but should still work, see http://php.net/manual/en/function.ereg.php http://docstore.mik.ua/orelly/webprog/pcook/ch13_02.htm
  23. Well, that's not quite correct. The doctype should be the first piece of code in your html file, above the <html> tag. We normally recommend the HTML 4.01 Strict doctype on this forum, but many people use the XHTML 1.0 doctype or the provisional new HTML5 doctype. Use the HTML 4.01 Strict doctype from here:- http://www.w3.org/QA/2002/04/valid-dtd-list.html Javascript is used for special dynamic features on a web page like a sliding photo gallery or a drop down menu an dneeds code inside <script type="text/javascript">...........</script> tags inside the head section although you can place the script tags anywhere, even at the bottom of the page just before the </body></html> closing tags. If you are a beginner you may not have any javascript code, but a doctype is essential. A custom stylesheet is a separate file with .css extension containing styles to apply to your tags, like backgrounds, font sizes, color, margins and so on. You link to the separate file with code in the head section of your html page:- <link rel="stylesheet" href="style.css" media="all" type="text/css"> http://www.w3schools.com/css/css_intro.asp http://www.w3schools.com/css/css_howto.asp Remember to validate (check) your code here:- http://validator.w3.org/
  24. The code for submit.php looks incomplete. It starts with \n\n"; } which would be half way through a file. It should start with <?php and an opening brace { somewhere but there is probably a lot more missing. Also it should end with ?> Go back to where you got the code from and copy it again.
  25. What's the code for submit.php because that file controls the sending of mail?
×
×
  • Create New...