404 Error page...with errors!!

Discussion in 'HTML & Website Design' started by typingmums, Oct 16, 2008.

  1. #1
    typingmums, Oct 16, 2008 IP
  2. garrettheel

    garrettheel Peon

    Messages:
    341
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #2
    It's because the link to the style sheet is now incorrect as you have gone into a folder.

    Your link was this - <link href="style.css" rel="stylesheet" type="text/css" />

    For the folder, you need it changed to this..

    <link href="../style.css" rel="stylesheet" type="text/css" />
     
    garrettheel, Oct 16, 2008 IP
  3. typingmums

    typingmums Well-Known Member

    Messages:
    1,446
    Likes Received:
    61
    Best Answers:
    0
    Trophy Points:
    140
    #3
    But that'll then efffect the styles of the files in the root folder wont it? I'll try it thanks :)
     
    typingmums, Oct 16, 2008 IP
  4. typingmums

    typingmums Well-Known Member

    Messages:
    1,446
    Likes Received:
    61
    Best Answers:
    0
    Trophy Points:
    140
    #4
    Yep just tried it and if I do that it doesnt link to the style sheet.

    I've added that as a 2nd link and that works to some degree..but it still doesnt link to the images...

    Anymore advice anyone?

    Thanks

    Rach
     
    typingmums, Oct 16, 2008 IP
  5. garrettheel

    garrettheel Peon

    Messages:
    341
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #5
    So I guess you're using includes which has the <style> tag in one file and it is included on all the pages? In that case, it's best to define the site's base url in a file. E.g $base_url = 'www.mysite.com/'; and then use absolute url's in your links. E.g href="<?php echo $base_url; ?>style.css"

    That means that, no matter where the style sheet is called, it will work.

    Same thing can be done for images if they are defined in the html sheets.

    <img src="<?php echo $base_url; ?>image.jpg" />
     
    garrettheel, Oct 16, 2008 IP
  6. rw_essen

    rw_essen Active Member

    Messages:
    174
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    58
    #6
    have you tried to modify the sheet to html and then add the .png ?
     
    rw_essen, Oct 16, 2008 IP