View Full Version : Total newbie needs pro to answer basic question
Hi there
I have a question that I'm sure is very basic to all you pros out there...I'm really new to CSS/dreamweaver/website design, and am trying to add the code for a navigation bar into my code page. The actual navigation bar I am trying to add is the one on this page: http://www.dynamicdrive.com/style/csslibrary/item/shade-image-tabs-menu/
It is now 2 o'clock in the morning, and I have tried so many different ways to add the code but I am not having any luck in getting it to resemble what it should! In my naivety, I presumed it was as easy as copying the code, and adding into my code page. I am sure this is a very basic question, and I will really appreciate anyone that can point me in the right direction.
Many thanks in advance. :)
Veronica
08-15-2007, 03:57 AM
OK, here's a few basics.
The part of the code on the DD page that's called "css" should be copied and pasted into the head section of your page. If you are using Dreamweaver, you should do this in code or html view (View->Code).
The part of the page that's called "html" should be copied and pasted into the body of your page where you want the navigation bar to be, again using code view.
Do those two steps, save the page, then look at it in the browser. If it looks OK, then start changing the links, the href part, again in code view, to your html links.
In one of the links on the DD page, you'll see the words class="selected" This goes with a different link on each page, ie the page you are on. In other words, if you are pasting this into your index.html page, you would use class="selected" on the index.html link, for that particular page.
In any case, try it and if it still doesn't work, post the url of your page and someone will try to help you further.
Hi Veronica
WOW, you are an absolute star! I'm sure this is a very simple process, copying and pasting code, but as I said previously I am totally new to this and it is a very steep learning curve. After readin a dreamweaver book, I have been left feeling that I really don't know now to make a website. I copied the code as per your instructions and, hey presto...it's worked! I've had a fiddle around with it and managed to change the colour, re-align it, and I'm feeling really excited by it all!!!
I would really appreciate it if you, or anyone else reading this, could explain to me: why do you need both CSS code and html code? I am thinking that perhaps the CSS is giving the page instructions about the design, colour, layout etc, whereas the html is needed as well as this give instructions about the links etc. Please can someone clarify this for me.
Also, does the CSS code always go in the head and the html in the body where it should show up on the page?
Does anyone know of any resources on the internet/tutorials/books I can find more info about copying code into my pages, as I would really like to get to grips with this?
Many thanks again - you're a star!
Veronica
08-15-2007, 02:31 PM
The w3 school tutorials are usually good, and easy to understand. For css, try http://www.w3schools.com/css/default.asp In very simplified terms, the html is the basic structure of a page, ie what the words say, what the links are, etc. The css is the style, look, and often layout of the page, and it generally goes in the head. Try the tutorials, and follow them step by step, and that should help
Okay, I'm getting there now, thank you...
One more question if poss:
What I would like to know is, is it not better to paste the html into the code page, and the CSS code into a blank CSS doc and make an external style sheet, then attach this external style sheet to my document? I'm only asking as there seems to be a lot of code by entering the CSS straight into the code page, and I'm wondering if it is neater/better to attach it as an external style sheet.
I did try to do this, but then when I preview my page in a browser, the navigation bar doesn't show up at all. Is there a step I'm missing?
Thank you once more in advance :o)
I'm really new to CSS/dreamweaver/website designI suggest you avoid Dreamweaver, or at least its WYSIWYG "design mode" features. I used to think that Dreamweaver was one of the better of such editors out there (not that that's saying much) but recent experience has caused me to doubt even that.
The w3 school tutorials are usually goodThe W3Schools tutorials are actually rather fallible. They contain a lot of info, so they are useful, but some of it is wrong, so you do have to have a good working knowledge to be able to tell the good from the bad. I suspect you'd be better off with the tutorials at http://www.howtocreate.co.uk/ to start off with.
What I would like to know is, is it not better to paste the html into the code page, and the CSS code into a blank CSS doc and make an external style sheet, then attach this external style sheet to my document? I'm only asking as there seems to be a lot of code by entering the CSS straight into the code page, and I'm wondering if it is neater/better to attach it as an external style sheet.If you only have it on one page, that's entirely up to you. If you have many pages using the style (or script in this case), putting it in an external file will greatly reduce bandwidth usage and decrease the loading time for your pages.
I have just got back from holiday and picked up your replies to my post, and just wanted to say thank you for taking the time to reply.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.