GT Portal . Forums . Official Tutorials . Art Galleries . FAQs . Search . New Posts . Contact Us Login  .  Register


GimpTalk Announcement :
Try your digital-art skills against your fellow gimpers in GIMPtalk's Biweekly Art competition !


Board index » Miscellaneous Forums » HTML, CSS, JavaScript, PHP, MySQL help forum Make Money Online . Free Image Hosting Script . Convert FLV to Cell Phone Format
Featured Tutorial : Learn how to create characters by Griatch
Search for :  


Post new topic Reply to topic   [ 55 posts ]   Go to page 1, 2, 3  Next


Author Message
 Post subject:
PostPosted: Tue Jan 02, 2007 8:21 pm 
Offline

Joined:
Tue Sep 12, 2006 12:44 am

Topics: 88
Posts: 1237

Find User's Topics

Welcome to my tutorial!

Today we are going to make a simple web page, that will look something like this.

Image

It will help if you have a basic knowledge of HTML and CSS, though if not and you have a short attention span then you may find this is a little difficult. Also I will assume you're familiar with using GIMP.

We'll start with the graphics!

Step 1

Open GIMP and create a new image with a transparent background that is 133px in width and 23px high. I will assume this is simple enough not to require a screenshot.

Step 2

This first image will be a button, so we will want to make it rounded.

Select all (hold "Ctrl"+"A"), then go to Select -> "Rounded Rectangle" and change the radius (%) to 70 and press ok. I am using GIMP 2.2.11, though if you do not have this feature available then you could use the elliptical tool (though your button may be more oval). Otherwise, you may want to consider upgrading GIMP to use this feature. Or your other option could be to zoom in then delete bits around the corners to make them rounded.

Next, you want to fill the selection with a colour of your choice. I have chosen to use a blue (3388ee) though you can use any you like.

What you have so far should look like something like this (note that I've zoomed in by 200%).

Image

Step 3

I think some scanlines would look good.

You may either use some of your own or download fencepost's scanline pattern here (be sure to thank him).

(Before asking how to install scanlines click here)

Or you could follow Get Firefox's tutorial.

Make a new layer and name it "Scanlines" then fill the layer with your scanline pattern.

I want to make the scanlines white, so go to "Layer" -> "Transparency" -> "Alpha to Selection", then fill the selection with white. Once you've done this, change the mode to "Overlay" then change the opacity to 40.

It should now look something like this.

Image

Step 4

To make it look more buttonish, I think it could use a highlight. Add a new layer and name it "Highlight". Next, activate the elliptical tool (press "E" on your keyboard).

IMO, feathering the edges of the elliptical selection will give the button a more natural transition between the highlight and the rest of the button. Feather the edges by 10 like so.

Image

While using GIMP, you may have noticed numbers on the bottom right hand side of the image you're working on, that show the current position of your mouse cursor.

Image

Zoom in at about 400% then position your mouse cursor at the coordinates "-20, 15", then click and drag your mouse cursor to the coordinates "153, -6" and release. Fill the selection with white, then change the mode to "Overlay" and change the layer opacity to "50".

Your order of layers so far should be like so

1. highlight
2. scanlines
3. background

Now you're finished!

What you have should look something like this.

Image

Step 4

Create a new folder somewhere you can easily find it, then save a copy of the image as "off.png". You can save the file with the .gif extension if you want to cater for people that use IE6 or earlier, (Microsoft Internet Explorer browsers have only recently started to support transparent PNG's), though I say get a decent browser.

Saying that though, there probably are other browsers that can't handle transparent PNG's, though if you really want to you could just make the background colour of the button the same as the background colour you'll be using on your web page.

Step 5

Change the background colour to a lighter colour then the original. I've used 33aaee.

Save the image as "over.png" (or "over.gif")

You should now have this.

Image

Step 6

We'll now be creating the header background!

Crate a new image 23px high and 15px wide.

Fill the image with your desired colour (I used 3388dd).

Step 7

Now repeat step 3 to add some scanlines.

Save the image in your folder as "tile.png."

You should now have this

Image

Step 8

Now I understand people reading this have varying levels of knowledge with HTML, so this next bit may get a bit more complicated for some, though just take your time with it.

Here is an example of how your layout would eventually be structured when you click on "HTML Tags" of the edit mode toolbar in NVU.

Image

So now we add the HTML.

Open a text editor such as Notepad, Kate or whatever you use. You may use NVU if you want, though remember that we're going to be working with source XHTML code.

If you're unfamiliar with XHTML then don't panic, it's pretty much the same as HTML except for a few differences.

What makes a valid XHTML document is the DTD tag, plus you have to consider the following tags.

You have to close each tag entity with a / slash. What I mean by tag entity's, are for example

Code:
<img src=...  />
<meta .... />
<hr />
<br />


.... anyway, onto your basic XHTML structure

Copy and paste this as your basic structure for the blank document.

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
  <meta http-equiv="content-type"
content="text/html; charset=ISO-8859-1" />
  <meta http-equiv="Content-Style-Type" content="text/css" />
  <title>.:: Welcome to my website ::.</title>
</head>
<body>

</body>
</html>


Step 9

Basically, there's nothing on your page so far. So lets add your template for the content.

This will go between your "body" tags.

Code:
<center>

<div class="main_container">
<div class="outer_left">
<div class="left_box">

<h1>Navigation</h1>
<ul class="navigation">
  <li class="navigation"
onMouseOver="this.className='navigation_hover'"
onMouseOut="this.className='navigation'">
    <a href="#" class="navi">Home</a>
  </li>

</div>
</div>

<div class="main_content">
<h1>Welcome to my website!</h1>
<p>
Your text will go here
</p>
</div>
</div>

</center>


So if you are able to preview what you have so far, how it would look is something like this.

Image

Doesn't look much so far eh? Well don't worry, we're about to fix that!

Step 10

Time to add the CSS information to improve the look.

Copy and paste the following. It should go in between the "head" section of your document.

Code:
<style type="text/css">
body {
margin:6px;
padding:0;
}
div.main_container {
width:80%;
border:0;
margin:0px;
padding:0;
}
div.outer_left {
float:left;
position:relative;
width:30%;
height:auto;
}
div.left_box {
width:auto;
height:auto;
margin:0;
padding:0;
outline:1px solid #000;
background-color:#eee;
}
div.main_content {
width:64%;
padding:0;
float:right;
position:relative;
margin-left:0;
margin-right:0;
margin-top:0;
margin-bottom:10px;
outline:1px solid #000;
background-color:#eee;
}
ul.navigation {
list-style-type:none;
margin:0;
padding:0;
}
li.navigation {
margin:3px;
padding:0;
background-image:url("off.png");
background-repeat:no-repeat;
width:133px;
height:23px;
text-align:center;
font-size:20px;
font-family:sans-serif;
}
li.navigation_hover {
margin:3px;
padding:0;
background-image:url("over.png");
background-repeat:no-repeat;
width:133px;
height:23px;
text-align:center;
font-size:20px;
font-family:sans-serif;
}
h1 {
background-image:url("tile.png");
background-repeat:repeat-x;
height:23px;
font-size:18px;
font-family:sans-serif;
text-align:center;
padding:0;
margin:0;
color:#000;
}
p {
font-size:16px;
font-family:serif;
text-align:left;
color:#000;
margin:3px;
padding:3px;
}
a {
font-family:sans-serif;
font-size:16px;
color:#000;
text-decoration:underline;
}
a:hover {
font-family:sans-serif;
font-size:16px;
color:#000;text-decoration:none;
}
a.navi {
font-family:sans-serif;
font-size:20px;
color:#000;
text-decoration:none;
}
a:hover.navi {
font-family:sans-serif;
font-size:20px;
color:#000;text-decoration:none;
}
</style>


Hopefully that didn't confuse the pants off you :o:

If you didn't understand any of it, then it's probably best if you just experiment and figure it out. You can't expect all of it to make sense in a couple of days (though it is possible), but just stick to what you know and gradually experiment with little bits you can play around with.

This is how it would look once you've added what's technically known as all that CSS stuff.

Image

When you hover your mouse over an item in the navigation, the background image should change.

That's what this bit of code is for

Code:
onMouseOver="this.className='navigation_hover'"
onMouseOut="this.className='navigation'"


What it does, is once you hover your mouse over the list item it changes to the class with the lighter background image (li.navigation_hover), then once you move your mouse away it changes back to the original class name (li.navigation).

And tutorial is now finished!

You can easily add box's on the left or right side, though

Unfortunately, I can't explain how all of it works or I'll be sitting here all week ...

You can download the full tutorial in a PDF format, along with all the files used here.

A few more notes ...

I'm guilty of producing a biased design, as this particular example has been designed for a screen resolution of 1024*768 or above. Saying that though, most of us probably use a screen resolution of 1024*768 or higher, though if you change the size of the "main_content" div to 400px (i.e.: div.main_content { ...) then I think the page should comfortably fit a screen size of 800*600 or above.

That's just something to take into consideration, though remember to experiment and consider your target audience.


Edit: CSS has been edited, so the page will now scale to fit the size of your screen. Also deleted a section of CSS that was not needed.

Example web template has been tested for and passed W3C compliance regarding the XHTML and CSS.

CQS? (Comments? Questions? Suggestions?)

CQS? I've just invented it (I think?)

If it's about this tutorial then post here. Questions concerning the use of the web template provided with the download should be PM'd to me or sent to nospamingdenegibson@gmail.com (but remove the "nospaming" bit).

Image



Top
 Profile E-mail  
 
 Post subject:
PostPosted: Tue Jan 02, 2007 8:25 pm 
Online
User avatar

Joined:
Wed Sep 20, 2006 10:30 pm

Topics: 218
Posts: 3260

Find User's Topics
Thanks man! Any tutorials on HTML are very helpful for me :l:

_________________
Image
Gifts Website
oh yeah - i'm a (legal) photoshop user now btw...

"Reading and flaming idiots on a forum > Critiquing the most useless form of art, ever."
-Hellboy, NSL


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 02, 2007 8:27 pm 
Offline

Joined:
Tue Sep 12, 2006 12:44 am

Topics: 88
Posts: 1237

Find User's Topics
No probs thanks for reading :h:

I messed up on the bb code a moment ago so don't be supprised if the tut has suddenly got longer :o:


Top
 Profile E-mail  
 
 Post subject:
PostPosted: Tue Jan 02, 2007 8:35 pm 
Offline
User avatar

Joined:
Tue Jul 04, 2006 12:19 am

Topics: 296
Posts: 5889

Find User's Topics
Wow, that's great, thank you for posting it! :) I knew most of it already, but there were parts that were new to me, too (XHTML). I'll probably try it when I have time.........

_________________
Image
Quote:
We are Robin Hood!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 02, 2007 8:43 pm 
Offline

Joined:
Tue Sep 12, 2006 12:44 am

Topics: 88
Posts: 1237

Find User's Topics
Quote:
Wow, that's great, thank you for posting it! :) I knew most of it already, but there were parts that were new to me, too (XHTML). I'll probably try it when I have time.........


I'm pleased to know you got something out of it :h:

Well if anyone does try this then I'd be interested to see their outcomes :w:


Top
 Profile E-mail  
 
 Post subject:
PostPosted: Tue Jan 02, 2007 8:51 pm 
Online
User avatar

Joined:
Wed Sep 20, 2006 10:30 pm

Topics: 218
Posts: 3260

Find User's Topics
Quote:
Well if anyone does try this then I'd be interested to see their outcomes

I'm gonna have to try this. I'll make sure to show it to you if I ever get a chance.

_________________
Image
Gifts Website
oh yeah - i'm a (legal) photoshop user now btw...

"Reading and flaming idiots on a forum > Critiquing the most useless form of art, ever."
-Hellboy, NSL


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 02, 2007 9:07 pm 
Offline

Joined:
Tue Sep 12, 2006 12:44 am

Topics: 88
Posts: 1237

Find User's Topics
@ Flying Penguin

Great I'll look forward to it :w:


Top
 Profile E-mail  
 
 Post subject:
PostPosted: Wed Jan 03, 2007 2:48 am 
Offline
User avatar

Joined:
Sun Sep 17, 2006 9:37 pm

Topics: 119
Posts: 1484

Find User's Topics
You know I love this tut, its awesome btw. If I do try it I will be using it for my site

_________________
http://parrappa.deviantart.com <------- My Templates


Top
 Profile E-mail  
 
 Post subject:
PostPosted: Wed Jan 03, 2007 3:16 pm 
Offline

Joined:
Tue Sep 12, 2006 12:44 am

Topics: 88
Posts: 1237

Find User's Topics
Quote:
You know I love this tut, its awesome btw. If I do try it I will be using it for my site


Cool! Thanks man :l:

Note that I've just fixed a few mistakes I made with the tut.

If downloading my tut or any files associated with it, then please remember that they haven't been updated yet.

Update:

You can now download the tutorial in a PDF format, along with all code and the images used for the website here


Top
 Profile E-mail  
 
 Post subject:
PostPosted: Wed Jan 03, 2007 8:17 pm 
Offline
User avatar

Joined:
Thu Oct 26, 2006 10:34 pm

Topics: 50
Posts: 323

Find User's Topics
I'm wondering what metas do????

_________________
ImageImageImageImage


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 03, 2007 8:19 pm 
Offline
User avatar

Joined:
Tue Jul 04, 2006 12:19 am

Topics: 296
Posts: 5889

Find User's Topics
Quote:
I'm wondering what metas do????

I'm not exactly sure, but I'm pretty sure that they can be used to put keywords in, and that way your website will be more likely to come up on a search.

_________________
Image
Quote:
We are Robin Hood!


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 03, 2007 9:22 pm 
Offline

Joined:
Tue Sep 12, 2006 12:44 am

Topics: 88
Posts: 1237

Find User's Topics
Meta tags do various things, though this bit

Code:
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />


basically tells search engines or your web browser the content of the web page is text/html and the character encoding of the content on your page. There's various different types for different languages, such as Russian, Japanese, etc. If I'm correct then that's one of the most common values (i.e.: ISO-8859-1) for the English language.

And this bit

Code:
<meta http-equiv="Content-Style-Type" content="text/css" />


again tells a search engine or a web browser there is text/css on a page.

Meta tags can also tell you about the author like so

Code:
<meta name="author" content="Dene Gibson"/>


keywords (though I'm unsure about other search engines, I know google doesn't pick up on them)

Code:
<meta name="keywords" content="GIMP, website tut, denegibson"/>


or the descripton of your website

Code:
<meta name="description" content="This page is a HTML tut written by Dene Gibson."/>


You can find out more about meta tags by visisting W3C.org or using google.


Top
 Profile E-mail  
 
 Post subject:
PostPosted: Wed Jan 03, 2007 11:55 pm 
Offline
User avatar

Joined:
Thu Oct 26, 2006 10:34 pm

Topics: 50
Posts: 323

Find User's Topics
Ok so they're basically like tags that people create for search engines????

_________________
ImageImageImageImage


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 04, 2007 11:34 am 
Offline

Joined:
Tue Sep 12, 2006 12:44 am

Topics: 88
Posts: 1237

Find User's Topics
@ Man of Valor

Though I think there's slightly more to it that's pretty much what they do.


Top
 Profile E-mail  
 
 Post subject:
PostPosted: Thu Jan 04, 2007 11:37 am 
Offline
User avatar

Joined:
Fri Nov 24, 2006 5:33 am

Topics: 201
Posts: 2665

Find User's Topics
i will most deffitly do this when i have time

_________________
Ty A90!!!
TY Bladesonic for this gift
Ty joshwess13 for this!
Ty Dusk!!
-------------------------------------------------------------------------------------------------------------------------------------
Image
mine^
-------------------------------------------------------------------------------------------------------------------------------------
Image
mine^


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 04, 2007 12:47 pm 
Offline

Joined:
Tue Sep 12, 2006 12:44 am

Topics: 88
Posts: 1237

Find User's Topics
Cool! If you feel like showing your result afterwards it'll be great to see :w:

Thanks for looking at my tut!


Top
 Profile E-mail  
 
 Post subject:
PostPosted: Thu Jan 04, 2007 10:04 pm 
Offline
User avatar

Joined:
Thu Oct 26, 2006 10:34 pm

Topics: 50
Posts: 323

Find User's Topics
I'll try it very shortly. I do have to code a template.

_________________
ImageImageImageImage


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 04, 2007 10:47 pm 
Offline
User avatar

Joined:
Mon Jul 24, 2006 2:23 am

Topics: 191
Posts: 1396

Find User's Topics
woh, very great tutorial, excellent job mate. :w:

_________________
Favorite
Image


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 05, 2007 8:28 am 
Offline

Joined:
Tue Sep 12, 2006 12:44 am

Topics: 88
Posts: 1237

Find User's Topics
Man of Valor:

Great! I'll look forward to seen your outcome if you wish to post it :w:

Mercenary:

Thank you for your kind words :]


Top
 Profile E-mail  
 
 Post subject:
PostPosted: Fri Jan 05, 2007 10:10 pm 
Offline

Joined:
Sat Dec 02, 2006 8:50 pm

Topics: 73
Posts: 758

Find User's Topics
AMAZING DENE AMAZING
check out my result

http://www.shadesofdesign.atspace.org

_________________
typhn


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 06, 2007 6:40 am 
Offline

Joined:
Tue Sep 12, 2006 12:44 am

Topics: 88
Posts: 1237

Find User's Topics
Thank you niteflite, it's great to see you've appreciated my tutorial ^_^

Your link doesn't seem to work at the moment. Site temporarily down?

Well I'll try again later, thanks for following!


Top
 Profile E-mail  
 
 Post subject:
PostPosted: Mon Jan 08, 2007 12:47 am 
Offline
User avatar

Joined:
Mon Jan 08, 2007 12:40 am

Topics: 2
Posts: 31

Find User's Topics
Nice one Deno, i am hoping to make a website one day, but it all looks to complex for a guy like me ;-)

- Del :h:

_________________
[Del]
web 2.0 forum
Prison Break Forum
Programmers Tutorials and Resources


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 08, 2007 10:04 pm 
Offline

Joined:
Tue Sep 12, 2006 12:44 am

Topics: 88
Posts: 1237

Find User's Topics
lol well keep practicing and one day you might even end up as a web developer who's good enough to work with things like C++ and SQL databases :w:

Thanks Del, nice to see you around here :h:


Top
 Profile E-mail  
 
 Post subject:
PostPosted: Wed Jan 10, 2007 10:36 pm 
Offline

Joined:
Sat Dec 02, 2006 8:50 pm

Topics: 73
Posts: 758

Find User's Topics
Ah yeh sorry dene heres da working link

http://shadesofdesign.atspace.org/

_________________
typhn


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 11, 2007 6:28 am 
Offline

Joined:
Tue Sep 12, 2006 12:44 am

Topics: 88
Posts: 1237

Find User's Topics
Thank you niteflite, your attempt looks pretty good :h:

How much of the coding did you understand?

If you could use a hand with it then I'd be happy to help :w:


Top
 Profile E-mail  
 
Display posts from previous:  Sort by  

Post new topic Reply to topic
 [ 55 posts ]  Go to page 1, 2, 3  Next



Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Related Website
Gimp tutorials database
All rights reserved © GimpTalk 2008
forum software by
phpBB