Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Re: trouble linking in css file

Reply
Thread Tools

Re: trouble linking in css file

 
 
Roy A.
Guest
Posts: n/a
 
      03-19-2010
On 19 Mar, 13:28, "Jeff" <(E-Mail Removed)> 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?
 
Reply With Quote
 
 
 
 
Roy A.
Guest
Posts: n/a
 
      03-19-2010
On 19 Mar, 16:34, "Jeff" <(E-Mail Removed)> wrote:
> the subfolder is in the same directroy as the html file
>
> "Roy A." <(E-Mail Removed)> wrote in message
>
> news:(E-Mail Removed)...
> On 19 Mar, 13:28, "Jeff" <(E-Mail Removed)> 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?
 
Reply With Quote
 
 
 
 
Jonathan N. Little
Guest
Posts: n/a
 
      03-19-2010
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
 
Reply With Quote
 
Roy A.
Guest
Posts: n/a
 
      03-19-2010
On 19 Mar, 21:10, "Jeff" <(E-Mail Removed)> 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, Telenor, has web space included in your account:
http://www.telenor.no/privat/interne...ider/index.jsp
 
Reply With Quote
 
Jonathan N. Little
Guest
Posts: n/a
 
      03-19-2010
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: trouble linking in css file dorayme HTML 1 03-19-2010 06:58 PM
Re: trouble linking in css file Captain Paralytic HTML 0 03-19-2010 04:25 PM
trouble with linking and login Jeff ASP .Net 1 12-20-2008 04:04 PM
trouble linking dynamically to javascript file in .master file Cold Filtered ASP .Net 0 02-18-2005 11:31 AM
trouble with linking of c wrapper around c++ class (gcc) selder21@hotmail.com C++ 2 01-14-2005 07:07 PM



Advertisments