Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
I'm stuck - 1st time coding from the buttom up
Old 03-12-2008, 06:03 PM I'm stuck - 1st time coding from the buttom up
Experienced Talker

Posts: 30
Trades: 0
I have made a couple of basic websites before using WYSIWYG html editors. However, I finally decided I want to learn how to actually code a page from scratch. I have a decent idea of the fundamentals but am stuck on how to create part of the basic layout and functionality of my site. I'm trying to create a navigation bar at the top just below a horizon logo/image that spans the entire width of the page. I want this logo/image to appear on every page along with this navigational bar. I want the navigational bar to be one of those mouse over types where each button changes with the cursor over it (think apple.com). So my questions are:

1) I know I want to program the navigation bar in javascript. It will have several different sections (home, about, contact etc...). Do I make it one picture and where is that picture placed, in the html of each page, in a master CSS document?

2) Same thing for the main logo/image. Is that in the html of every page or in a master CSS file?

3) If I have to "slice" up the navigation bar into multiple images, how do I get it to still look like one picture? I have heard of "hotspots" but will that work with javascript?

4) More of a general question. Can CSS be contained in a javascript file and vice-versa?

Sorry for all of the questions. Any recommended reading or links would be great too, thanks.
samo1215 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 03-12-2008, 09:20 PM Re: I'm stuck - 1st time coding from the buttom up
Banned

Posts: 143
Name: Blake
Location: Cuyahoga falls,Ohio
Trades: -2
u can use java css is for styling the webpage and html is for the structure of it . u should have a decent look around the whole entire page starting from ur homepage to other links on ur website keep a consistent Look on all pages (:

Last edited by blktallos; 03-12-2008 at 09:31 PM..
blktallos is offline
Reply With Quote
View Public Profile Visit blktallos's homepage!
 
Old 03-12-2008, 10:47 PM Re: I'm stuck - 1st time coding from the buttom up
Experienced Talker

Posts: 30
Trades: 0
I apologize, I don't know that I'm being clear. I am trying to create a consistent look to all of the pages on my site. Hence, I was going to create a master css file with all of the font, background color and other relevant style information. I then plan on linking to that in each html document. My main problem is that I want to put the same picture and navigation bar at the top of each page. I want to use a javascript code to animate the navigation buttons. So my questions are as follows:

1)The main image - is that in each individual html document or somewhere else?

2)The navigation menu--how do I create this image. I know it has to be two separate images (one off, one on), but how do I get these and the corresponding javascript in my site?
samo1215 is offline
Reply With Quote
View Public Profile
 
Old 03-13-2008, 04:01 AM Re: I'm stuck - 1st time coding from the buttom up
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,382
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Quote:
I was going to create a master css file with all of the font, background color and other relevant style information.
Yes.

Quote:
1)The main image - is that in each individual html document or somewhere else?
You can define it as a background for an element that appears on every page or for the body element.

Quote:
2)The navigation menu--how do I create this image. I know it has to be two separate images (one off, one on), but how do I get these and the corresponding javascript in my site?
It doesn't have to be in javascript
These can be defined in CSS rules using pseudo-classes See CSS Rollovers for my basic demos.

Or Server side includes can be used in both instances to create the design you are after.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 03-13-2008, 06:37 AM Re: I'm stuck - 1st time coding from the buttom up
RadGH's Avatar
Skilled Talker

Posts: 76
Name: Radley
Trades: 0
Quote:
Originally Posted by samo1215 View Post
I'm trying to create a navigation bar at the top just below a horizon logo/image that spans the entire width of the page. I want this logo/image to appear on every page along with this navigational bar.
I'll be honest with you, the easiest way to make a template that works cross-page is to use PHP. This way, you can have your "navigation.html" seperate from "downloads.html". In essence, the PHP takes the source code out of navigation.html and puts it into downloads.html. This is very easily done using something like:
PHP Code:
..</head>
<body>
<?php include 'navigation.html' ?>

This will appear under navigation.html, unless you didn't close a tag or something.
</body>
</html>
You might not be ready to use PHP, but if I would have known it was that easy, I would have learned it when I first started

Quote:
I want the navigational bar to be one of those mouse over types where each button changes with the cursor over it (think apple.com).
I don't think you're ready for how apple does it. Which, I'm not an apple fan, so I'll just say Youtube does it the same way to make Apple not look so pro

Quote:
1) I know I want to program the navigation bar in javascript. It will have several different sections (home, about, contact etc...). Do I make it one picture and where is that picture placed, in the html of each page, in a master CSS document?
There is no real "answer" for this, but heres some suggestions for you.
1: Place your navigation images in http://www.webmaster-talk.com/images/nav/ [Why did it do that? lol], if you have that navigation.html seperate with PHP suggested earlier, make sure it can access the images from where its located (Not from where the including file is!), as in /images/nav. If its located in /includes that would point to /includes/images/nav even when included.


2: You can use two, three, or four images to animate it. Or you can use however different images as one image a piece (per link).
You can do sort of like apple did, make two animations one on top of the other and just change to background-attachment: bottom;.

If you want to go all out with four images (this will work for three too), you can make two on top and two on each side, then use a combination like background-attachment: top left; to select the top left image.

NOTE: When using more than one image per image make sure you specify the height and width exactly, or you may see part of the other animations (I really don't like to call them that, though).


3: If you really want to animate the pictures, as in an animated GIF, I know The GIMP gives you the option to make images only animate once, and stop on the last frame. This is great for making an image fade in/out - but will not work with the multiple images per image method.


4: [b]Use unordered lists[b]. Almost every navigation menu is made of an unordered list. They are very handy for navigation menus (horizontal and vertical). See up in the top right the "User CP", "Private Messages", etc? Thats actually an unordered list. For this, keep in mind the following style tags:
  1. #nav li {display: inline;} For each UL item so they appear on one line (especially IE6)
  2. #nav li a {display: block;} Use this for the actual hyperlink so that the entire button is clickable, rather than the text ()
  3. #nav li {list-style: none; | OR | background: none;} gets rid of the bullets.
  4. margin: 0; padding: 0; Gets rid of the indentation
See something like Listamatic: Horizontal Rollover Navbar

Quote:
2) Same thing for the main logo/image. Is that in the html of every page or in a master CSS file?
Read only #1 from above

Quote:
3) If I have to "slice" up the navigation bar into multiple images, how do I get it to still look like one picture? I have heard of "hotspots" but will that work with javascript?
Read #2 from above (I didn't even read this and I answered it )

Quote:
4) More of a general question. Can CSS be contained in a javascript file and vice-versa?
Uh, I'm not sure about that. They can both be contained in a PHP file though. Actually PHP will contain even text documents as regular HTML.

Quote:
Sorry for all of the questions. Any recommended reading or links would be great too, thanks.
Google | W3schools - That what I use

Last edited by RadGH; 03-13-2008 at 06:39 AM..
RadGH is offline
Reply With Quote
View Public Profile
 
Old 03-13-2008, 12:25 PM Re: I'm stuck - 1st time coding from the buttom up
Experienced Talker

Posts: 30
Trades: 0
Thank you very much, I really appreciate the help. The php recommendation looks interesting. Admittly I don't know the first thing about it coding it though. Any books on CSS, Html, Javascript & PHP you all think would be useful to a novice?
samo1215 is offline
Reply With Quote
View Public Profile
 
Old 03-13-2008, 02:08 PM Re: I'm stuck - 1st time coding from the buttom up
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
Quote:
I'll be honest with you, the easiest way to make a template that works cross-page is to use PHP
No it isn't, and not everybody knows or wants to delve into learning a complicated scripting language.

HTML & CSS books - http://www.sitepoint.com/books/html1/ - excellent book

There is no reason to make your navigation with javascript, as Chris pointed out. It's better that you DON'T do it with scripting, it will be more accessible and search engine friendly. For the same reasons, it is NOT a good idea to make your main navigation a batch of images.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to I'm stuck - 1st time coding from the buttom up
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.74818 seconds with 12 queries