Jump to content
Killersites Forums

Navigation links


woodturnersvilla
 Share

Recommended Posts

Hi I'm building a website, following the beginners website design videos that I bought- all going well so far except - one of my navigation links stays underlined when I'm on that page. In the text doc (do you call it the code?) I have formed it exactly the same as the other linked pages. I have taken out the hyperlink tags where it is listed. I think it should not be underlined when that is the page that is open. AS it is, it acts like a link in that if clicked on while it is open, the page closes and goes to home page (index link) even if home page wasn't the last page I was on.

Thanks - I'd appreciate help!

Link to comment
Share on other sites

Thanks- the post seemed to finish with the words "It should be" with a horizontal scroll below it.

 

I had the following for the doctype...

 

Are you saying I should change that line for.....

/p>

 

On all my pages?

 

NO !!!

 

 

including the url from w3.org as shown here:-

http://www.w3.org/QA/2002/04/valid-dtd-list.html

Edited by Wickham
Link to comment
Share on other sites

I've got the pages linking thanks and now working on CSS. It doesn't seem to work as explained and demonstarted in the videos. I have written in my code

 

 

the ROOT.css page is filed in the website folder as Stefan shows and I have only written the following so far.

p {

 

width: 80%;

colour: blue;

 

 

}

 

Which I understand should tell the browser to apply the styles on the css page to the webpage however it is not working, any ideas?

Link to comment
Share on other sites

Well, two things:

 

-- width:80% - This may be working correctly, but it's possible that it won't make any visible difference. It just depends on the content on the page, and also the width of your browser window. I'd ignore this for now, fix the issue that I mention below, and make sure that your styles are being applied correctly first.

-- colour: blue - This needs to be spelled "color" (no "u")

Link to comment
Share on other sites

Is your CSS file is in a different folder to the other files? If so you need to link it like this

 

 

replace foldername by the name you have used for your folder.

 

Always use lowercase letters when naming css, html files, images and folders. Most web servers (the computers you?ll eventually be putting your site onto) are case-sensitive, which means it matters to them whether your files use capital letters or not.

Link to comment
Share on other sites

Is any of your CSS showing up on your page and just this p thing not? If nothing shows, then you have a path or spelling issue - if just the p declarations aren't showing, you may have an error in your stylesheet somewhere before the p {.... that prevents the CSS from being read. Or there might be an error in your html (is there even a p tag? Is there any content between your p tags?) --- or you have some inline or internal styling that overwrites the external stylesheet.

 

 

Can we see the code that you have now again - html AND css?

Link to comment
Share on other sites

 

Back to Home

 

 

 

 

 

Woodturners Villa

 

Luxury Accommodation New Zealand

 

Come and enjoy this unique Ohakune property on the Mangateitei Stream with unlimited views of Mt Ruapehu. Set among mature trees on a hectare of tussock grassland divided by the mountain stream, you won?t find anything better.

Woodturners Villa is a newly restored 1910 villa, renovated for your comfort. A large log fire greets you as you arrive, restored double glazed windows capture the sun, and the house is fully insulated throughout. Crafted antique furniture complements the native timber floors, ceilings and stained glass doors. To top it all off, the full length veranda overhangs the stream edge; wind down to the music of water, watch the beautiful river stones and you may even spot trout!

 

Situated only a comfortable stroll to the town centre, Woodturners Villa is your perfect destination for exploring natural New Zealand. Tongariro National Park provides the exceptional Turoa ski field for an awesome snow holiday; mountain biking tracks, tramping and day walks extend throughout the alpine area . Rich in natural and cultural history this World Heritage Site has much to offer visitors to Aotearoa New Zealand.

 

Whatever your adventure, come home to relax in the luxury of Woodturners Villa.

 

 

Link to comment
Share on other sites

Somehow it seems there is no link between the css page and the code - is this possible?
Of course that's possible - per your HTML, your css file is called 'root.css' - just like that - all lower case. And your root.css is saved into the same folder your html is saved into -so not another directory, they sit right next to each other.

 

I uploaded your html & css: http://aandbwebdesign.com/misc/wood.html - and it works. Just note that I've renamed the css to wood-css -only because I already had another root.css file in that folder.

 

Also, it'd be better to start your css in order - so defining your background, container, etc, and work your way down to the finer details like paragraph tags.

 

I always start my css with * (margin: 0; padding: 0;} to prevent cross-browser discrepancies. Then I add the margins and padding back in wherever they are needed. Alternatively, there is a whole and much more detailed 'initial css' here: http://www.killersites.com/forums/topic/150/initial-css-file-to-jump-start-your-project/ that might help you get started.

Link to comment
Share on other sites

So if it is working for you and not for me, could it be a problem with my computer? I have found that when I add something to the code and save it, it doesn't show up on the html page by refreshing. I have to 'save as' the code to the html page for it o show up on the page.

 

Yes I have the css page and the html sitting in the same folder. I have even tried placing the code (index.txt) in the same folder also and I am still unable to get the results I see in http://aandbwebdesign.com/misc/wood.html.

 

Thanks for all your help!

Link to comment
Share on other sites

I assume you are using a text editor to write your html and css code. You need to save your index file as index.html and your css files as root.css, your text editor is probably saving them as .txt files. You need to change this so that the file extensions are .html and .css only.

Link to comment
Share on other sites

One other thing to check, since no one has mentioned it yet... By default, Windows hides the file extension on files. So, for example, you could have a file named root.css.txt, which would cause your issues.

 

To check this:

-- open up a new file explorer window

-- Go to Tools > Folder Options

-- select the "view" tab

-- make sure that the checkbox "hide extensions for known file types" is unclicked

 

This may have nothing to do with the problems you are experiencing... but it's worth checking just in case.

Link to comment
Share on other sites

The code I'm talking abut is the index.txt file that I posted. I save this as an html which is the web page I view.

When I save the index.txt I need to 'save as' index.html and the root.css as root.css.

 

Yay ! I have now unclicked the "hide extensions for known file types" and I can see the css style on the html page

THANK YOU

Link to comment
Share on other sites

I still can't seem to get the image to appear. Does it need to be a gif file or is jpeg ok? I tried to save it as a gif when it didn't show up as thats what is used on the videos, now I can see the file extensions I see it is actually still a jpeg image, it looks like this WT_logo.gif.jpg.

 

From the code, can you see any reason I am unable to view the image on the html page? The images folder is sitting in the same folder as the html page.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...