Skip to main content

Center an object - vertically and horizontally

You can easily center an object on the page - both vertically and horizontally - using the HTML code example below.  It can be any object.  And it will automatically center for any size window, even if the window is re-sized.  Simply replace the <img> tag with what ever you want to be centered.

<table border="0" height="100%" width="100%">
  <tr>
    <td>
      <table border="0" align=center valign=middle>
        <tr>
          <td>
            <img src="image.gif">
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>


If you want to use code that will pass W3C Validation (the table height and valign parameters work fine but are not W3C valid), you can use the example below, but you must adjust the margin-top and margin-left to be half of the width of the image.

<div style="position: absolute; top: 50%; left: 50%; margin-top: -5px; margin-left: -25px">
  <img src="image.gif">
</div>


A collection of great HTML "One Liners"

You can easily create a scrollable text box with this one line <div> tag.   You can put anything inside the scrollable area.   This is a very simple one line alternative to the iframe.

<div style="padding: 20px; overflow: auto; border: solid 1px black; width: 400px; height: 300px;">
Content goes here
<div >


Use this line to pre-load those mouseover images to avoid browser delay:

<img src="image.gif" alt="" style="display: none;">


Get rid of the IE image toolbar with this one line in the <head> section of your html:

<meta http-equiv="imagetoolbar" content="no">


Disable the "right click" with the oncontextmenu parameter in your body tag (this parameter is not W3C standards compliant but it works with most browsers):

<body oncontextmenu="return false">


Disable autocomplete on any input field with the autocomplete parameter in your input tag:

<input . . . autocomplete="off">


You can tell search robots to index your main page and go no further with this one line in the <head> section of your html:

<meta name="ROBOTS" content="INDEX,NOFOLLOW">


You do a simple redirect to another page by putting this one line in the <head> section of your html.
The zero is how many seconds to wait before doing the redirect.

<meta http-equiv="refresh" content="0;URL=http://yourdomain.com/anypage.htm">


You force a page refresh (to keep your content current) putting this one line in the <head> section of your html.
The 300 is how many seconds to wait before doing the refresh.

<meta http-equiv="refresh" content="300">


If your page does not need to scroll, in certain situations IE may still show the browser gutter (placeholder for the scrollbar).
Get rid of it with this one Style Sheet line:

html {overflow:auto;}


If you want a multi-line alert box, use JavaScript alert and use "\\n" for a line break.

alert ('This is line one\\nThis is line two');


Comments

Popular posts from this blog

links

0.  https://michael67654.qowap.com/64523001/new-pos-technique-to-perk-up-your-company 1.  https://johnnydinqr.blog2learn.com/52856602/new-pos-system-to-perk-up-your-company 2.  http://edwinsqgcu.onesmablog.com/New-POS-Process-to-Perk-Up-Your-company-43309737 3.  http://chloe69246.bloguetechno.com/New-POS-Process-to-Perk-Up-Your-Business-39814721 4.  http://jacob87541.pointblog.net/New-POS-Technique-to-Perk-Up-Your-online-business-43741223 5.  http://arlette53302.thezenweb.com/New-POS-System-to-Perk-Up-Your-online-business-41464611 6.  http://devinpixna.tinyblogging.com/New-POS-Program-to-Perk-Up-Your-online-business-46354577 7.  https://rylanevsom.blog5.net/46759651/new-pos-program-to-perk-up-your-small-business 8.  https://mariowoesh.affiliatblogger.com/56515206/new-pos-system-to-perk-up-your-organization 9.  https://liam66429.diowebhost.com/60164326/new-pos-procedure-to-perk-up-your-company 10.  https://henry19219.fitnell.com/4557...

Raisonnement, la résolution de problèmes

Les chercheurs ont d'abord développé des algorithmes mimétiques raisonnement humain étapes que les gens utilisent pour résoudre le casse-tête ou faire méthode d'exclusion logique. [2] Dans les années 1980 et 1990 fin, l'étude de la grippe aviaire a développé des méthodes de traitement de l'information incertaine ou incomplète, en utilisant des concepts de probabilité et de l'économie. [3] Pour ces problèmes, les algorithmes requis matériel assez puissant pour effectuer des calculs de géant - à subir « combinaisons d'explosion »: la quantité de mémoire et le temps de calcul peut devenir invisible prendre si la résolution d'un problème difficile. La plus haute priorité est l'algorithme de recherche pour résoudre le problème.  Les gens utilisent généralement les jugements rapides et intuitifs plutôt que pas de déduction que les chercheurs en IA d'origine peuvent simuler. [5] Amnesty International a progressé en utilisant la résolution de problèmes « c...

Tracking and Securing Downloads

If you want to report or track downloads from your website, try this script.   This script will send you an email every time you have a download.   The email will tell you what file was downloaded and who did the download.   You could change this script to keep counts (store them in flat file or MySQL) if you desire. The variable $directory is the directory where the download files are located.   If you want the script in the same directory as the files then use "./" as the directory (you must always have the slash). In your html page, use the following structure as your download link (where name.txt is the file name to download): <a href="download.php?file=name.txt">download</a> Then you use the following script (called download.php): - - Start Script Here - - <?php $emailaddress  =  "email@yourdomain.com" ; $filename  =  $_GET [ 'file' ]; $directory  =  "downloads/" ; $path  =  "$directory$filename" ; putenv (...