External CSS does not work

Discussion in 'HTML & Website Design' started by theshad_ow, Jul 16, 2008.

  1. #1
    Hi everyone,
    Finally I was able to fix my CSS and the layout but now the external css doesn't work at all. It works fine as internal CSS. Any thoughts on the issue?

    External CSS
    http://www.owace.com/gls/index.html

    Internal CSS
    http://www.owace.com/gls2/index.html

    Also if someone could help me with the '@font-face' property as the font does not show up on a browser at different computer.

    Thanks in advance!
     
    theshad_ow, Jul 16, 2008 IP
  2. -Hammad-

    -Hammad- Peon

    Messages:
    37
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Try it like this:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>::Globe-Link Sourcing Inc.::</title>
    <link href="http://www.owace.com/gls/css/style.css" rel="stylesheet" type="text/css" />
    </head>
    
    
    <body>
    <div id="container">
    	
        <div id="content">
          <p class="style2">Ahead of the Fashion Curve</p>
    
          <p>this is where the content goes!this is where the content goes!this is where the contentgoes!this is where the content goes!this is where the content goes!this is where the content goes!this is where the content goes!this is where the content goes!this is where the <br/>
            <br/> content goes!this is where the content goes!this is where the content goes!this is where the content goes!this is where the content goes!this is where the content goes!this is where the content goes!this is where the content goes!this is where the content goes!this is where the content goes!this is where the content goes!this is where the content goes!</p>
        </div>
        
     	<ul id="menu-container" class="menu">
    		<li class="who"><a href="who.html"></a></li>
    		<li class="what"><a href="what.html"></a></li>
    		<li class="brands"><a href="brands.html"></a></li>
    
    		<li class="contact"><a href="contact.html"></a></li>
     	</ul>
     </div>
     
    
    </body>
    </html>
    HTML:
     
    -Hammad-, Jul 16, 2008 IP
  3. bavington

    bavington Peon

    Messages:
    74
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Hammad is right, you just need to change This

    To This

     
    bavington, Jul 17, 2008 IP
  4. nicangeli

    nicangeli Peon

    Messages:
    828
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    0
    #4
    They both do the same....

    Are you sure that the images are in the correct directory? The css file is working.


    I recommend that you move the css file into the document root, then change the call to the css file to just style.css.
     
    nicangeli, Jul 17, 2008 IP
  5. chapicha

    chapicha Peon

    Messages:
    235
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I agree with nicangeli .

    your web not show all images. check your images directory.
     
    chapicha, Jul 17, 2008 IP
  6. theshad_ow

    theshad_ow Peon

    Messages:
    23
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Thanks guys. I am going to test all that have been suggested and get back to you guys.
     
    theshad_ow, Jul 17, 2008 IP
  7. theshad_ow

    theshad_ow Peon

    Messages:
    23
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    It works if I put the css file in the root but not in any other folder:S I checked all the names, directory names, spelling, images and everything is correctly defined. Any ideas on why it cannot read the css file from within a folder? I even tested it locally on the computer but same issue.
     
    theshad_ow, Jul 17, 2008 IP
  8. nicangeli

    nicangeli Peon

    Messages:
    828
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    0
    #8
    The css file is working, the problem lies within the referencing to the images. If the css file is in a folder called css, then the way that you reference the images, like background-image: URL("bg.gif");

    The computer looks for bg.gif in the css directory. To avoid this you can give the full path to the (example) bg.gif file, such as http://www.mydomain.com/bg.gif
     
    nicangeli, Jul 17, 2008 IP
  9. theshad_ow

    theshad_ow Peon

    Messages:
    23
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    I got what you're saying. Hope it works. Thanks!!!!!!!!
     
    theshad_ow, Jul 17, 2008 IP