Solved

CSS: embedded vs. linked --  body rule works when inline, but not when in sep. file

Posted on 2012-03-16
4
190 Views
Last Modified: 2012-06-22
http://burstpouch.com/company.php

i was transferring tags to an external/linked CSS defns file.  When defined inline inside the php (html) file, the Verdana font displayed perfectly.
i cut and pasted to the external file, and it does not work.

body,td,th {
      font-family: Verdana, Geneva, sans-serif;


what am i doing wrong??  

thanks!
0
Comment
Question by:willsherwood
  • 2
4 Comments
 
LVL 14

Expert Comment

by:athomsfere
ID: 37731053
Do you have a closing } in the CSS?
0
 

Author Comment

by:willsherwood
ID: 37731104
not sure i understand the question: here's copied from the file...
/* CSS Document */
<style type="text/css">
body,td,th {
      font-family: Verdana, Geneva, sans-serif;
      font-size: 12px;
}
body {
      margin-left: 0px;
      margin-top: 0px;
      margin-right: 0px;
      margin-bottom: 0px;
      background-color: #666;
}
0
 
LVL 22

Accepted Solution

by:
Kim Walker earned 500 total points
ID: 37731153
You don't need the style tag in an external CSS file. Delete the following line and any closing tag at the end.

<style type="text/css">

Open in new window

0
 

Author Closing Comment

by:willsherwood
ID: 37731197
YAY that was it.  thanks!
0

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

"I want to put my photos online, but I don't want them stolen.  What settings should I use?" When You Put Photos Online First and foremost, any digital file published on the WWW can be copied, stored, modified, retransmitted, etc.  Remember Naps…
When applying CSS to your HTML, there are many different ways to select which element(s) the CSS applies to.  Some of these selectors are more commonly known and used than others - Here are the more common ones: #X - Matches an ID of X .X - Matche…
In this tutorial viewers will learn how add a full-size background image to a webpage using CSS3. Create a new HTML document with an internal stylesheet.: In CSS, define the html element to have a background image. Use a high resolution image.: In t…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question