View Full Version : javascript/css help

05-09-2011, 04:59 PM
Hey I've been basically trying to build my website without using design view or the photoshop exporter and I'm having trouble with a couple things, I was trying to clean up my code and link to a java script file but it doesn't show up at all on my website unless I insert the code directly into my html section.

In terms of CSS I was hoping someone could check my nav bar code it's not working properly and I've been playing with settings all night, like when you click a link it still takes you to the page but it selects the whole bar rather than the one image.

fixed: 1 problem

www.brave-design.ca (http://www.brave-design.ca)

Thanks again, also Corrosive your tutorials are beast I've gone through most of them now, it's so clear and easy to follow.

05-10-2011, 12:33 AM

meta name="description" content="Brave Designs offers a unique, affordable and personable solution to web design and development.">


meta name="designer" content="Josh James">


meta name="copyright" content="Copyright 2010">

These meta tags need to be properly closed. Use />. Right now you have >.
That is not a real issue though...

This one is:


li class="home"><a href="index.html">Home</a></li>


li class="about"><a href="about.html">About</a></li>


li class="portfolio"><a href="portfolio.html">Portfolio</a></li>


li class="media"><a href="media.html">Media</a></li>


li class="contact"><a href="contact.html">Contact</a></li>

This is correct, however in using photoshop your pages have rendered as .png files, so you have them stored as .png. See above how the file endings are ".html" ? I've not used photoshop to create an entire page, and a better answer may be forthcoming, but in the immediate moment your navigation tags are looking for a non-existent html file and hence go 404 on you...

Without being able to see these files I don't know what's in them or how they're scripted, but again for the moment at least your core problem there is identified.

05-10-2011, 12:48 AM
As far as your javascript goes, I don't see a thing in your index page about it, so did you take it out?
Playing with metaphors here, let me put it like this:

Your javascript engine is a separate file, stored wherever you like. (VCR player)

In your page head, you put a link to this file, which commands it to turn on.
(power switch)

In your html, you put commands in which tell the VCR which movie to play, in what order, how fast, how big a TV etc...

Silly I know, but message is javascript such as I assume you are trying to use is a three part process...

05-10-2011, 05:19 AM
Thanks John, fixed the html code, and yeah I haven't created those pages yet, I still need to make a template for them. I just added the javascript back in to the html so you can take a look at it, before I had <script
language="javascript" src="easyrotator.js"></script> in my header html and I put the easyrotator content on that javascript file but it never showed up on the page.

So your saying I also need to put commands to direct the java in my html? I don't know if you can help me out with it, but I'm not sure what I need to add/remove from the script for it to run off the .js file.

Appreciate the help

05-10-2011, 06:28 AM
Thanks again, also Corrosive your tutorials are beast I've gone through most of them now, it's so clear and easy to follow.

That's good because that's point of them. Thanks for road testing :)

Is everything sorted now with your javascript image thing now? Seems to be working.

05-11-2011, 07:16 AM
Np man, and I had it all working perfectly but I messed it up lol, I added in a css tag

border: solid 3px color:#000;

and it added a border to all the images in the java file and messed up the alignment and the buttons, so I removed the code but it still shows the border, I tried remaking the rotator but it didn't help

05-11-2011, 08:36 AM
nvm fixed it