Today I'm gone teach you how to create tooltips in HTML. First of all, you need to let the computer know that we are writing javascript - So start by typing:
<script language="javascript">
</script>;Now that we have the container for the javascript we can now add the actual code for the tooltips. Paste this inside the script tags:
I thought I would just take a minute to share this little code snippet with you as I had some trouble finding posts online that would tell me if I was going about this the right way! The problem is that I needed a fast way to count how many rows were in a database without using a CPU demanding function like mysql_num_rows().
<?php
$query = 'SELECT COUNT(*) FROM `users`';
$result = mysql_query($query) or die('Sorry, we could not count the number of results: ' . mysql_error());
$numberofresults = mysql_result($result, 0);
?>You can also limit the count to only rows that meet a certain value:
<?php
//Where the user id is greater than 149.
$query = 'SELECT COUNT(*) FROM `your_table` WHERE `id` > 149';
$result = mysql_query($query) or die('Sorry, we could not count the number of results: ' . mysql_error());
$numberofresults = mysql_result($result, 0);
?>AutoDesk is giving away free copies of its student programs like AutoDesk Inventor. If you are a student you need to take a minute to register for this great offer! (visit Student Autodesk)
As soon as my month-long fight with my computer-box is over (Curse you SATA, Cheap Video Cards, and ECS Mobos), I plan on releasing some Inventor tutorials and because it is a $4000 program (Full Version) this maybe your only chance to grab a copy!
Please note that you must be a student with a college email address(I think they also allow Highschool emails). Also, you will need a decent video card for this program as it is a 3D modeling program. (64MB video card should be fine - but I suggest a 128MB.)
After traveling around looking at sites that hurt my eyes I thought I would put together a basic template that is good-looking, XHTML valid with 3-Columns, and yet simple enough that you can easily navigate the page.
So here is a Cross-Browser compatible design that I have tested in IE6 & 7, Firefox 2, and Opera 9. You can see it live here: Simple 3 Column
Now, the point of this design isn't necessarily for you to just have something through up on your site - but for you to have a basic design to work off of and to hack into your own custom creation. That is why I have included TWO style sheets with this theme. The default is "pretty.css" but if you plan on using the layout as a basis for your own design I recommend you open "index.html" and change the style sheet from "pretty.css" to "simple.css". Because the simple style sheet is cleaner and easy to follow for those changing things...
If you have ever taken a dive into the CSS code of a layout you liked - only to find something like this:
.object {
margin: 0px auto 20px .8%;
padding: 0em 25px;
}Now first off, how many of you have ever be at a lost as to the direction you were going? Or have to think for a minute to figure out where West is from North? Even more to the point - how many of you have ever heard the old saying "Never Eat Soggy Waffles"? (No, quite that! - I didn't make it up!) Well, for all us humans without GPS systems - this saying stands for "North East South West" which is the clock-wise order of the directions.
---N---
W-----E
---S---When you see something like:
.object {
padding: 10px 25px 5px 0px;
}If you're just learning how to create your own little space in the vast expanse of the World Wide Web you are starting at a great time.
When I began learning, nearly 10 years ago, I had to crack open the books, fire up Wordpad and figure this stuff out by trial and error. If I needed help, it was a long search through various indexes.
Now, there are so many resources on the web that anyone wanting to learn HTML or any of the vast languages out there, they have gold readily available at the click of a mouse. Plus, with Web 2.0 becoming more and more prevalent, instant examples are here.
Case in point is the HTML Playground: http://htmlplayground.com/
The name says it all. A list of web coding tags are available for you to select and have instant examples and sample code to look at and then edit it and see what happens.
This is a fantastic resource for any beginner and one I highly recommend checking out and, well, playing around with!
In my last posting, I demonstrated how to create a header and footer file to be included at the top and bottom of all, or at least many, pages. This makes it easy to modify those parts and have the changes automatically spread across all the pages that share that header and footer file. This is one of the things a CMS simplifies for the user.
But what if part of your header, or footer, file is your navigation system and you want the button or link to change when the page associated is chosen? That means your header, or footer, must change depending on what page it's included on. Actually, that's one of the beautiful things about PHP - since it's commands are processed prior to the display of the page, you can program those changes to happen for you automatically.
I've been absent from this site for a while, so I thought I'd jump back in with a simple yet effective Photoshop tutorial.
This tutorial assumes you know how to create a basic selection and understand layers - but that's really it. I will be using Photoshop CS2 on Windows XP.
I call this effect, for lack of a better term, a "motion zoom". This effect adds a blur that creates a zoom focused on a selected item in a picture.
I have attached the photo I will be using called "skateboard.jpg". I find that the best pictures for this effect are ones with a busy background. Solid colors or plain backgrounds limit the effect.
So, open up "skateboard.jpg" into Photoshop.
-- Double click on the layer called "Background" to make it available to edit. I renamed it to "Zoom Background". You may do so if you wish.
-- Next, select your "lasso" tool (L) and select around the skateboarder like so:
