Code2Design.com
P.S. Don't leave without watching the Video Tutorials!

User login

Programming

The Layout

Navigation

Popular content

Resources

Who's online

There are currently 0 users and 5 guests online.

Javascript tooltips

Easy tooltips using javascript and html

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:


Submitted by Alxandr on June 2, 2007 - 5:51pm.
read more | add new comment

SELECT COUNT from database

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($result0);
?>

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($result0);
?>


Submitted by David on May 14, 2007 - 12:16am.
read more | 4 comments

Free AutoDesk Inventor

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.)


Submitted by David on April 19, 2007 - 10:05pm. |
David's blog | 4 comments

Simple 3 Column

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...


Submitted by David on April 18, 2007 - 1:13am.
read more | 1 comment | 1 attachment

Understanding CSS Dimensions

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;
}

Then this tutorial is for you - because today I am going to explain the strange dimension system built into CSS! :)

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---

Well, CSS also uses the clockwise order of directions. Take a look at the following code:

When you see something like:

.object {
padding: 10px 25px 5px 0px;
}


Submitted by David on April 17, 2007 - 7:24pm. |
read more | 1 comment

Instant HTML Help

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!


Submitted by WarpNacelle on April 14, 2007 - 5:19am. |
WarpNacelle's blog | 2 comments

You Can CMS Without One Two

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.


Submitted by maspick on April 5, 2007 - 8:07pm. |
read more | maspick's blog | 1 comment

Photoshop Motion Zoom

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:


Submitted by WarpNacelle on April 1, 2007 - 4:20am.
read more | add new comment | 1 attachment




Like what you see?

Why not add more? C2D is looking for other Christian Web Masters who would like to help write articles for this site. If you have expericance in FLASH, CSS/HTML, PHP/MySQL, PhotoShop/GIMP, Blender, Javascript, or just General Design - our users would love to hear what you have to say. Contact Us

delicious   digg   reddit   magnoliacom   newsvine   furl   google   yahoo   technorati