Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS ..Help with positioning and using a personal template

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #22860
    DarrenClark
    Member

    Hi..

    I was wondering if you guys could help me on a little issue or two that I have.

    Positioning:
    The first one is regarding the change of position of the content/menu (using the same coding – I believe!) between various pages on here. For example, if you first click "Rhuematology", then after that click "Paediatrics" you will see that the menu, content title/content and footer all move slightly up. This happens between various pages, why would this be? Any advice on how to solve this?

    Templates:
    Also, as you can see the page header, menu and footer remain the same throughout the website. Is there a way to use a template so that this information is not reloaded each time you view a different page (I’ve seen the Dreamweaver template option – is it this or maybe an "include"?).

    Thanks again guys, any advice is greatly appreciated!

    Darren

    #48255
    laith
    Member

    Positioning
    It looks like you have different definitions for "p" in your files. Some files use p {margin: 0; } and some use p {margin: 5px; } causing your content to shift either up or down. You should use one external style sheet and include that file in each of your HTML files.

    You should move your CSS to a separate file (to avoid inconsistencies like this), and link the CSS file your HTML files.
    <link href="yourCSS.css" rel="stylesheet" type="text/css" />
    Then when you make changes to your CSS, you only need to edit the one file and not each HTML file.

    Other
    If you use PHP, you could include the header, footer, menu, etc. in each file, if your server supports PHP.
    Example:
    /* index.php file */
    <body>
    <?php include ‘header.inc’; ?>

    <?php include ‘footer.inc; ?>
    </body>
    You could google this topic by searching for something like "how to use PHP includes"

    #48268
    DarrenClark
    Member

    Thanks Laith.. I will look into this and hopefully sort the problem now!!
    :D

    #48269
    DarrenClark
    Member

    I managed to sort the "p" issue out and I am now using the external linked stylesheet as suggested!

    Still to look into using an include for the footer, header, menu etc but in the meantime, does anyone know why the footer is now moving on the page and not sitting to the bassline as previous. The CSS code is here.

    Website – http://www.studentdoctors.co.uk.

    Thanks,

    Darren

    #48310
    DarrenClark
    Member

    Anybody? I’m using the same CSS code as before (when I had the CSS on each page and not linking to the external stylesheet).

    Seems strange that it worked before but doesn’t any longer?

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘CSS’ is closed to new topics and replies.