[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.5

charset utf-8 declaration in CSS causes Safari to not display background

Asked by yessirnosir in Cascading Style Sheets (CSS), Adobe Dreamweaver

Tags: charset, utf-8, css, dreamweaver, safari, background

Have noticed before that if I create a new CSS file in DW it automatically puts these two lines at the top of the file:
@charset "utf-8";    
/* CSS Document */

I always ignored that until yesterday when, in answering a question here on EE someone pointed out that my solution wasn't displaying correctly in Safari.  Upon digging a bit, I found that the "@charset "utf-8"" statement was the culprit -- Safari would not display the background color on my <body> tag unless I deleted that charset line.  Sample code below can be used to see the problem in action.

So my questions are:
1. is this a Safari bug?
2. is there some preference in DW that I should change so it doesn't automatically add that line, or uses a different format?
3. will there ever be a case where deleting that line from my CSS will cause some other problem, or can I just delete it from all my CSS files with impunity?

Will split points to anyone with relevant input.
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
<!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>Test Charset UTF-8</title>
<style type="text/css">
@charset "utf-8";    /* this line, inserted by Dreamweaver if you create a new CSS file, causes Safari to ignore the background color */
/* CSS Document */
body {background:blue;}
</style>
 
</head>
 
<body>
</body>
</html>
This question has been solved and asker verified.
All Experts Exchange premium technology solutions are available to subscription members.
Subscribe now for full access to Experts Exchange and get
INSTANT ACCESS TO THIS SOLUTION
Plus...
30 Day FREE access, no risk, no obligation
Collaborate with the world's top tech experts
Unlimited access to our exclusive solution database
Never be left without tech help again
 
Zones: Cascading Style Sheets (CSS), Adobe Dreamweaver
Tags: charset, utf-8, css, dreamweaver, safari, background
Solution Provided By: GreenGhost
Participating Experts: 3
Solution Grade: A
 
 
 
Loading Advertisement...
20100614-EE-VQP-166 - Hierarchy / EE_QW_EXPERT_20070906