SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Member
    Join Date
    Aug 2009
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Help for a Newbie please!

    This is probably pretty easy for someone to help me with.
    I'm just starting out, I'm about halfway through the excellent build your own website book and I've run into a little problem. (Im at page 161)
    My pages are all looking exactly as they should, and I'm finding all the CSS stuff is making sense so far.
    One page is looking different to all the others (the index page).
    I can't understand how this could be, considering I have only one CSS style sheet, and all the HTML pages are referancing the same page.
    It's only a small difference, but the h1 on my index page seems to still have a margin at the top, which is pushing it and the tagline down and causing the navigation section to obscure them... it looks messy anyway.
    Any ideas as to why this is happening?
    Many thanks in advance!!

  2. #2
    SitePoint Wizard bronze trophy conradical's Avatar
    Join Date
    Jan 2005
    Location
    Atlanta
    Posts
    2,354
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Paste the code of your index page and of a page that works the way it should, including the CSS.

  3. #3
    SitePoint Member
    Join Date
    Aug 2009
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I will thanks. Is it ok just to post the code here or should I attach the files?

  4. #4
    SitePoint Wizard bronze trophy conradical's Avatar
    Join Date
    Jan 2005
    Location
    Atlanta
    Posts
    2,354
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by jesso View Post
    I will thanks. Is it ok just to post the code here or should I attach the files?
    Paste your code. Attaching files means a moderator has to approve it or something like that. Better yet, publish it to a public server where we can access it.

    When pasting, select the appropriate code type from the Syntax drop down menu above your text box. Paste each individual page/CSS file as new blocks as opposed to pasting all three in one block.

  5. #5
    SitePoint Member
    Join Date
    Aug 2009
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks conradical, congratulaltions on your new arrival by the way!
    I tried posting the code, but I keep getting told off for the links that are embedded (in the code).
    Then I tried to host the site somewhere, but thats a bit complex for me at the moment (it's getting late and my brain is running out of steam!).
    Heres a link to the files....

    www(dot)box.net/shared/z9t0iiqlbo

    Thanks for your time!
    Last edited by jesso; Sep 24, 2009 at 15:05. Reason: Brain ceasing to function correctly.

  6. #6
    SitePoint Wizard bronze trophy conradical's Avatar
    Join Date
    Jan 2005
    Location
    Atlanta
    Posts
    2,354
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    I don't have time to troubleshoot why this works but removing the <p> tags from your validator image does the trick.

    You have this:
    Code HTML4Strict:
            <p>
        <a href="http://validator.w3.org/check?uri=referer">
        <img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0 Strict" height="31" width="88" /></a>
              </p>

    Try this (without the <p> tag wrapped around the image). You don't have to wrap P tags around your image anyway.
    Code HTML4Strict:
        <a href="http://validator.w3.org/check?uri=referer">
        <img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0 Strict" height="31" width="88" /></a>

    Also, check the link to the image and verify you copied the correct code. Lastly, check your Doctype and basically the area above the <body> tag. You might have another problem there. I don't have time to troubleshoot that right now.

  7. #7
    SitePoint Member
    Join Date
    Aug 2009
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Much appreciated conradical, that sorted it out!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •