View Full Version : Resolved Top margain / footer css advice
theremotedr
04-30-2015, 08:16 PM
Each page on my site has the same layout look in respect to top of the page / footer page and then there is the content in between.
My home page on the other hand has a different setup & i would like to edit/alter something so when flicking from page to page there is no jumping on the home page.
Go to this page http://www.theremotedoctor.co.uk/karaudi.html#topnav then whilst on the page select HOME PAGE,you will see that the Home page nudged up.
This is the same for each page visited then selecting the Home page.
I am not sure how to go about correcting this.
I would also like to bring the bottom up a touch on the Home page to align like the pages.
I am not sure how to tackle this either but if the body section needs to be made a little shallower to achieve this then that is not a problem.
If you could advise how to go about this & where i need to make the edits then that will be great.
Maybe a minor/trivial request but i would like it to all be uniform.
Thanks again.
molendijk
04-30-2015, 08:48 PM
Every page chosen by the visitor as a starting point for taking a walk on your site has one and the same issue: there's a slight scrolldown at the beginning. This a probably caused by some line in your js, but it might be a css-thing.
So I would advise you to check all your js- and css-lines to see if there's any line causing the scroll.
molendijk
04-30-2015, 10:02 PM
For a quick fix, put this at the very end of your page(s):
<script>
$('*').scrollTop(0);
</script>
theremotedr
04-30-2015, 10:27 PM
Hi
Would this need to just go on the home page ?
molendijk
04-30-2015, 10:42 PM
That depends on how your site is organized, codewise speaking. Put it on one or two pages first, and see what happens.
theremotedr
04-30-2015, 10:55 PM
Ok
Do I then alter the (0) value to get the desired scroll to place, I mean I can alter this so the top of the page then is in a similar position to my other pages ?
molendijk
05-01-2015, 12:15 AM
Just leave (0) as it is.
theremotedr
05-01-2015, 06:20 AM
Hi,
That made no change at all.
molendijk
05-01-2015, 10:35 AM
I looked at the sources of your pages, and the script isn't there. So it can't work. Where did you put it?
theremotedr
05-01-2015, 10:52 AM
I put the script at the bottom of the basic page http://www.theremotedoctor.co.uk/basic.html
As it did not work i took it off.
I have now put it on again so you can check it etc.
molendijk
05-01-2015, 11:43 AM
The basic page is fine now. But I don't see the script. Where is it?
theremotedr
05-01-2015, 12:22 PM
At the bottom of the page lower let
molendijk
05-01-2015, 01:16 PM
I don't get it. Are we talking about the same page? Here's what I did:
1) I went to http://www.theremotedoctor.co.uk/basic.html
2) I did a right-click and selected 'view source'
3) At the top of the source page, I clicked on 'Edit'
4) I then selected 'search' and typed 'scroll'
5) The only thing I got was:
$('html, body').animate({
scrollTop: $("#mainImage").offset().top
}, 1000);
Not the script I gave you.
theremotedr
05-01-2015, 04:17 PM
Hi,
Sorry about that,internet been on/off today.
I seen the code that you advise and thought i can then just edit the code at the top being <li class="current"><a href="basic.html#top">Home page</a></li>
Thanks for the help.
styxlawyer
05-01-2015, 08:07 PM
Have you run your page through the W3C Markup Validation Check (http://validator.w3.org/check?uri=http%3A%2F%2Fwww.theremotedoctor.co.uk%2Fbasic.html%23top&charset=%28detect+automatically%29&doctype=Inline&group=0)? It reports 58 errors and 12 warnings. Any one of those could be the source of your problem.
theremotedr
05-01-2015, 08:42 PM
Didn't know of such a thing so no.
More work!
theremotedr
05-02-2015, 11:18 AM
UPDATE
I have gone through my pages and made edits reducing the error messages,thanks for the web link.
Can you advise how i would correct the errors below.
http://www.theremotedoctor.co.uk/basic.html#top
Message 1 & code,
Line 178, Column 83: End tag div seen, but there were open elements.
<center><img src="m-images/uk-seller.jpg" alt="logo" class="border"></div>
Message 2 & code,
Line 178, Column 17: Unclosed element center.
<center><img src="m-images/uk-seller.jpg" alt="logo" class="border"></div>
http://www.theremotedoctor.co.uk/accaudi.html#topnav
Message 3 & code,
Line 160, Column 22: Section lacks heading. Consider using h2-h6 elements to add identifying headings to all sections.
<section id="content">
styxlawyer
05-02-2015, 08:30 PM
HTML must be nested correctly so:
<div>...<center>...</div>...</center>
will show as an error. The correct sequence is:
<div>...<center>...</center>...</div>
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.