Re: trouble linking in css file

Discussion in 'HTML' started by Roy A., Mar 19, 2010.

  1. Roy A.

    Roy A. Guest

    On 19 Mar, 13:28, "Jeff" <> wrote:
    > hi
    >
    > The effects of my css isn't applied to the page, thinks this is related to
    > page not finding my css or there is something wrong with my css.
    > below you see both my html and my css. The layout.css file is included in
    > the subfolder \css.
    >
    > html:
    > <!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" lang="en-US" xml:lang="en-US">
    >  <head>
    >   <title>test</title>
    >   <link href="css/layout.css" rel="stylesheet" type="text/css" />
    >  </head>
    >  <body>
    >   <div id="header">
    >    header
    >   </div>
    >   <table style="width:100%">
    >    <tr>
    >     <td style="width:160px; background-color:#ddeecc;">left</td>
    >     <td style="background-color:#ddccee;">middle</td>
    >     <td style="width:350px; background-color:#cc11cc;">right</td>
    >    </tr>
    >   </table>
    >   <div style="width:100%; background-color:#eeccdd;">
    >    footer
    >   </div>
    >  </body>
    >
    > </html>
    >
    > css:
    > body { margin:0px; font-family:Arial, Verdana, Sans-Serif;  font-size:12px;
    > color:Black; background-color:Yellow; }
    >
    > #header
    > {
    >   background-color:yellow;
    >   width:100%;
    >
    > }
    >
    > any suggestions?


    Is the subfolder in the same directory as your html file, or are you
    using a webserver like localhost?
     
    Roy A., Mar 19, 2010
    #1
    1. Advertising

  2. Roy A.

    Roy A. Guest

    On 19 Mar, 16:34, "Jeff" <> wrote:
    > the subfolder is in the same directroy as the html file
    >
    > "Roy A." <> wrote in message
    >
    > news:...
    > On 19 Mar, 13:28, "Jeff" <> wrote:
    >
    >
    >
    >
    >
    > > hi

    >
    > > The effects of my css isn't applied to the page, thinks this is related to
    > > page not finding my css or there is something wrong with my css.
    > > below you see both my html and my css. The layout.css file is included in
    > > the subfolder \css.

    >
    > > html:
    > > <!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" lang="en-US" xml:lang="en-US">
    > > <head>
    > > <title>test</title>
    > > <link href="css/layout.css" rel="stylesheet" type="text/css" />
    > > </head>
    > > <body>
    > > <div id="header">
    > > header
    > > </div>
    > > <table style="width:100%">
    > > <tr>
    > > <td style="width:160px; background-color:#ddeecc;">left</td>
    > > <td style="background-color:#ddccee;">middle</td>
    > > <td style="width:350px; background-color:#cc11cc;">right</td>
    > > </tr>
    > > </table>
    > > <div style="width:100%; background-color:#eeccdd;">
    > > footer
    > > </div>
    > > </body>

    >
    > > </html>

    >
    > > css:
    > > body { margin:0px; font-family:Arial, Verdana, Sans-Serif; font-size:12px;
    > > color:Black; background-color:Yellow; }

    >
    > > #header
    > > {
    > > background-color:yellow;
    > > width:100%;

    >
    > > }

    >
    > > any suggestions?

    >
    > Is the subfolder in the same directory as your html file, or are you
    > using a webserver like localhost?


    Both codes validates and are ok. It works locally when I test it. Have
    you tried to test it in different browsers?
     
    Roy A., Mar 19, 2010
    #2
    1. Advertising

  3. Jeff wrote:
    > I've tryed in IE8 and Opera - same problem in both. The body isn't applied
    > the css style in the css file.
    > also no css is applied to the header div
    >


    Gazing into my crystal ball, because you are too far away to use my
    Vulcan Mind-Meld where you have not supplied a URL: I have to say it is
    a 99% chance that you are doing something wrong and a 1% chance it is a
    server confirmation problem. If you copy the file and the css folder
    with the layout.css to your desktop and it still does not work you can
    rule out the server.
    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
     
    Jonathan N. Little, Mar 19, 2010
    #3
  4. Roy A.

    Roy A. Guest

    Roy A., Mar 19, 2010
    #4
  5. Jeff wrote:
    > it isn't easy to show a url when you haven't got a host to host it on, hope
    > there are some free hosts I can use
    >
    > any free hosts I can upload this html to?


    Your ISP?
    or
    http://www.lmgtfy.com?q=free web hosting

    Lastly, please stop top-posting! Trim and bottom or interleave please.

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
     
    Jonathan N. Little, Mar 19, 2010
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Cold Filtered
    Replies:
    0
    Views:
    474
    Cold Filtered
    Feb 18, 2005
  2. Replies:
    2
    Views:
    4,386
    Derek
    Jan 14, 2005
  3. Jeff

    trouble with linking and login

    Jeff, Dec 20, 2008, in forum: ASP .Net
    Replies:
    1
    Views:
    311
    Gregory A. Beamer
    Dec 20, 2008
  4. Captain Paralytic

    Re: trouble linking in css file

    Captain Paralytic, Mar 19, 2010, in forum: HTML
    Replies:
    0
    Views:
    483
    Captain Paralytic
    Mar 19, 2010
  5. dorayme
    Replies:
    1
    Views:
    464
    Jukka K. Korpela
    Mar 19, 2010
Loading...

Share This Page