Jump to content

Link to Root.CSS Does not work


HRichardB

Recommended Posts

It could be a lower case/upper case problem. Root.css is not the same as root.css.

 

The css file needs to be in the same directory as the html file as you haven't used a sub-folder/sub-directory.

 

Also use } not > for the closing tag of the style.

Edited by Wickham
Link to comment
Share on other sites

Thanks but still no solution. Its in the same folder as rest of other pages. Those pages work. Only root.css page not working. Web page is not responding to css code which I located above

p {width:400px;

color:red;

}

h3 {border-top:1px solid black;

width 400px }

Link to comment
Share on other sites

Can you post the head section of the HTML page, please.

Do you have more than one CSS file? Is there any CSS code in the style tags of the html page? (just asking)

 

We could check stuff as well by using a link to the page if it is on-line.

Link to comment
Share on other sites

Here is the head section of HTML containing the CSS code file location:

 

wed design - tutorial

 

 

 

This is the only area calling for CSS coding.

Sorry but I not sure how to create a link for viewing.

 

the root.css file contains:

 

p {width:80%; color:red;}

h3 {border-top:1px solid black; width 80% }

 

in the notepad txt format.

Link to comment
Share on other sites

Sometimes when you think you have saved a file as root.css or file.html, they have actually been saved as root.css.txt and file.html.txt and the .txt extension should not be there.

 

Use Windows Explorer with View/ Details and with file extensions visible and check and delete .txt if necessary. (In Tools, Folder Options, View, uncheck Hide file extensions for known file types (so that they will show).

Edited by Wickham
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...