Home page fine, it is links to other pages???

New to web-building ? Simple answers to "How do I . . .?"

Moderators: BobCP, agsone, Neil Parks, gregtutor, Lem3

Re: Home page fine, it is links to other pages???

Postby Dinoman on Tue Oct 23, 2012 9:52 am

gregtutor wrote:Unfortunately, this time I cannot help, as I can only see what you upload to some public place and not what is happening on your computer.


Hi Greg, no problem, Thanks anyway, someone else might come up with a solution, Regards DM

Greg, I just uploaded my Megasquirt Logo to http://www.megasquirtuk.co.uk just to see if I could load an image as I am having so much trouble with my other site, and it is only displayed on the Home Page ?? what is the matter is my Style Sheet not working ? any help appreciated, Regards DM
Last edited by Dinoman on Tue Oct 23, 2012 4:44 pm, edited 1 time in total.
Dinoman
 
Posts: 123
Joined: Thu Apr 05, 2012 4:14 pm
Country: United Kingdom (uk)

Re: Home page fine, it is links to other pages???

Postby agsone on Wed Oct 24, 2012 12:45 am

The logo as you have it is linked from the html file not the style sheet, so you'll have to set the link to the image separately on each page.
agsone
Moderator
 
Posts: 1376
Joined: Mon May 21, 2007 7:33 pm
Location: Connecticut, USA
Country: Scotland (sp)

Re: Home page fine, it is links to other pages???

Postby Dinoman on Wed Oct 24, 2012 4:38 pm

agsone wrote:The logo as you have it is linked from the html file not the style sheet, so you'll have to set the link to the image separately on each page.


Hi Agsone, Thanks, I have just tried that and all I am getting is the Text Logo no image so is it something to do with the style sheet as it only expect text for Headding, anyway Thanks for your help, Regards Dm
Dinoman
 
Posts: 123
Joined: Thu Apr 05, 2012 4:14 pm
Country: United Kingdom (uk)

Re: Home page fine, it is links to other pages???

Postby gregtutor on Wed Oct 24, 2012 5:11 pm

Hi Dm,

You're misunderstanding Agsone's comment.

Your page includes the code:

<div id="header">www.megasquirt-uk.com<br>
<img style="width: 288px; height: 128px;" alt="logo" src="images/mslogo.jpg"><br>
</div>

It is this that tells the browser where to find the image to display. (It should be in a sub-folder called "images" and the file is "mslogo.jpg" - however the file is clearly NOT at that location or not named that and that is why you see the alternative text you have defined.)

This code is NOT in the stylesheet file "msstyle.css" which would affect the styling of the <div#header> on every page so that is why he says you would need to add the code on every page on the site to the various pages.
Greg Chapman
http://www.gregtutor.co.uk
Helping new users of KompoZer - but using BlueGriffon
gregtutor
Moderator
 
Posts: 3784
Joined: Wed Jun 20, 2007 8:25 am
Location: The Norfolk Broads, UK
Country: England (en)

Re: Home page fine, it is links to other pages???

Postby agsone on Wed Oct 24, 2012 5:18 pm

For info, last night there was an image correctly linked from index.html but there was no link from all the other pages. Now there's a link from all the pages but no image to link to.

As Greg said, the image has either been deleted from the web server, moved somewhere else or renamed.
agsone
Moderator
 
Posts: 1376
Joined: Mon May 21, 2007 7:33 pm
Location: Connecticut, USA
Country: Scotland (sp)

Re: Home page fine, it is links to other pages???

Postby Dinoman on Wed Oct 24, 2012 6:07 pm

gregtutor wrote:Hi Dm,

You're misunderstanding Agsone's comment.

Your page includes the code:

<div id="header">www.megasquirt-uk.com<br>
<img style="width: 288px; height: 128px;" alt="logo" src="images/mslogo.jpg"><br>
</div>

It is this that tells the browser where to find the image to display. (It should be in a sub-folder called "images" and the file is "mslogo.jpg" - however the file is clearly NOT at that location or not named that and that is why you see the alternative text you have defined.)

This code is NOT in the stylesheet file "msstyle.css" which would affect the styling of the <div#header> on every page so that is why he says you would need to add the code on every page on the site to the various pages.


Hi Greg, what would I do without this Forum, so again Thanks, so could I add this code to my "msstyle.css" and get it to work on all pages as If I add some new pages in the future it would be nice ??, god knows where my logo image went but I just uploaded it and now everything is back to normal, so I will leave well alon for a while and have a rest, before I come back and have another go at doing the Graphic Buttons for my Menue, so any way Thanks again, Regards DM
Dinoman
 
Posts: 123
Joined: Thu Apr 05, 2012 4:14 pm
Country: United Kingdom (uk)

Re: Home page fine, it is links to other pages???

Postby Dinoman on Wed Oct 24, 2012 6:10 pm

agsone wrote:For info, last night there was an image correctly linked from index.html but there was no link from all the other pages. Now there's a link from all the pages but no image to link to.

As Greg said, the image has either been deleted from the web server, moved somewhere else or renamed.


Hi agsone, Thanks again, I just uploaded my "mslogo.jpg" and now all is fine, so again Thanks, Regards DM
Dinoman
 
Posts: 123
Joined: Thu Apr 05, 2012 4:14 pm
Country: United Kingdom (uk)

Re: Home page fine, it is links to other pages???

Postby gregtutor on Wed Oct 24, 2012 11:10 pm

Dinoman wrote:so could I add this code to my "msstyle.css" and get it to work on all pages as If I add some new pages in the future
Not "this code" exactly, as CSS has a different syntax and slightly different properties to HTML, but you most certainly could add delete your logo from your current page, and instead set it as a background image to the #header rule. You would need your rules to do these things.

You can add the rules very easily using the "CSS Stylesheets" dialogue. They would have to:

# Give sufficient height to the block to ensure both the site title and logo would display satisfactorily (Box Tab)
# Display the image without tiling, centred and at the bottom. (Background tab)

I'll let you work out the options!
Greg Chapman
http://www.gregtutor.co.uk
Helping new users of KompoZer - but using BlueGriffon
gregtutor
Moderator
 
Posts: 3784
Joined: Wed Jun 20, 2007 8:25 am
Location: The Norfolk Broads, UK
Country: England (en)

Re: Home page fine, it is links to other pages???

Postby Dinoman on Thu Oct 25, 2012 1:43 pm

gregtutor wrote:
Dinoman wrote:so could I add this code to my "msstyle.css" and get it to work on all pages as If I add some new pages in the future
Not "this code" exactly, as CSS has a different syntax and slightly different properties to HTML, but you most certainly could add delete your logo from your current page, and instead set it as a background image to the #header rule. You would need your rules to do these things.

You can add the rules very easily using the "CSS Stylesheets" dialogue. They would have to:

# Give sufficient height to the block to ensure both the site title and logo would display satisfactorily (Box Tab)
# Display the image without tiling, centred and at the bottom. (Background tab)

I'll let you work out the options!


Hi Greg, Thanks again, I will have a go at that and see how I get on, but as usual I will be back when I mess up, so again Thanks, Regards DM
Dinoman
 
Posts: 123
Joined: Thu Apr 05, 2012 4:14 pm
Country: United Kingdom (uk)

Re: Home page fine, it is links to other pages???

Postby Dinoman on Sun Oct 28, 2012 9:47 pm

Hi Greg, I have managed to get my latest "Megasquirt" logo up and for some reason my Style sheet dose not seem to be working as to test I put some green borders on my menus items but they only work on my home page, so what am I missing, again any help appreciated, regards DM
Dinoman
 
Posts: 123
Joined: Thu Apr 05, 2012 4:14 pm
Country: United Kingdom (uk)

Re: Home page fine, it is links to other pages???

Postby gregtutor on Sun Oct 28, 2012 10:12 pm

The short answer is that your stylesheets are in a complete mess.

On the index page styling is controlled by:
<link rel="stylesheet" href="msstyle.css" type="text/css">

And the aboutus page is controlled by another stylesheet at:
<link rel="stylesheet" href="images/msstyle.css" type="text/css">

While on the page:
http://www.megasquirtuk.co.uk/ms1v2.2.html
you have an internal stylesheet and no link to an external sheet at all.

These are just the first three pages I looked at, so you need to check everything properly!
Greg Chapman
http://www.gregtutor.co.uk
Helping new users of KompoZer - but using BlueGriffon
gregtutor
Moderator
 
Posts: 3784
Joined: Wed Jun 20, 2007 8:25 am
Location: The Norfolk Broads, UK
Country: England (en)

Re: Home page fine, it is links to other pages???

Postby Dinoman on Mon Oct 29, 2012 9:55 pm

gregtutor wrote:The short answer is that your stylesheets are in a complete mess.

On the index page styling is controlled by:
<link rel="stylesheet" href="msstyle.css" type="text/css">

And the aboutus page is controlled by another stylesheet at:
<link rel="stylesheet" href="images/msstyle.css" type="text/css">

While on the page:
http://www.megasquirtuk.co.uk/ms1v2.2.html
you have an internal stylesheet and no link to an external sheet at all.

These are just the first three pages I looked at, so you need to check everything properly!


Hi Greg, I have redone all my pages on http://www.megasquirtuk.co.uk ?? but I still have problems, it seems I still have not got the hang of these Style Sheets, and also my Home and Contact us buttons are staying black together ?? anyway any help appreciated, Regards DM
Dinoman
 
Posts: 123
Joined: Thu Apr 05, 2012 4:14 pm
Country: United Kingdom (uk)

Re: Home page fine, it is links to other pages???

Postby gregtutor on Mon Oct 29, 2012 11:27 pm

You only have to hover over black buttons to see you have removed the links and that's nothing to do with stylesheets, so you can't blame a lack of understanding of them for the problem!
Greg Chapman
http://www.gregtutor.co.uk
Helping new users of KompoZer - but using BlueGriffon
gregtutor
Moderator
 
Posts: 3784
Joined: Wed Jun 20, 2007 8:25 am
Location: The Norfolk Broads, UK
Country: England (en)

Re: Home page fine, it is links to other pages???

Postby Dinoman on Tue Oct 30, 2012 11:52 am

gregtutor wrote:You only have to hover over black buttons to see you have removed the links and that's nothing to do with stylesheets, so you can't blame a lack of understanding of them for the problem!


Hi Greg, sorry I was not blaming the Style Sheets for my Black button problem that was just an "also" ? I have redone and checked my links several times and can not find the problem as I have never had 2 stay black together before, so any help appreciated.

And back to the Style Sheet as I said it still dose not seem to be working correctly, and I have removed all other Style sheets and imported my "msstyle" one but it still only works on the Home page so what am I missing, again any help appreciated, Regards DM
Dinoman
 
Posts: 123
Joined: Thu Apr 05, 2012 4:14 pm
Country: United Kingdom (uk)

Re: Home page fine, it is links to other pages???

Postby gregtutor on Tue Oct 30, 2012 1:48 pm

Dinoman wrote:I was not blaming the Style Sheets for my Black button problem that was just an "also" ? I have redone and checked my links several times and can not find the problem as I have never had 2 stay black together before, so any help appreciated.
I say again...

On the home page you have removed the link on the "Contact Us" button. That is why you have a second black button. (Remember: Your stylesheet tells the browser to make buttons with no links black! Place a link on a button and it will turn blue and respond to hover with grey.)
And back to the Style Sheet as I said it still dose not seem to be working correctly, and I have removed all other Style sheets and imported my "msstyle" one but it still only works on the Home page so what am I missing
From what I can see your stylesheet only works on all the other pages. I say that because the home page has the "wrapper" ID assigned to the <body> tag whereas all other pages have it assigned to the first <div> tag.

You'll need to explain what you expect to happen before anyone can say how to achieve it.
Greg Chapman
http://www.gregtutor.co.uk
Helping new users of KompoZer - but using BlueGriffon
gregtutor
Moderator
 
Posts: 3784
Joined: Wed Jun 20, 2007 8:25 am
Location: The Norfolk Broads, UK
Country: England (en)

PreviousNext

Return to Beginner Q & A


Who is online

Users browsing this forum: No registered users and 1 guest