An error occurred while introducing the css file in php, but the webpage already has a style.

Source: Internet
Author: User
An error occurred while introducing the css file in php, but the webpage already has a style. for help, an error occurred while introducing the css file in php, but the webpage already has a style. the error code is as follows:


Reply to discussion (solution)

The code is as follows: php code




<! -- {Webname} -->



Top


Header


Nav


Search


User


News


Pic


Rec


Sidebar-right


Picnews


Newslist


Link


Footer



The webpage already has a CSS style, but an ERROR is reported. The following is the css code:
@ CHARSET "UTF-8 ";
Body, h1, h2, h3, p, form, ul, li, dl, dt, dd {
Padding: 0;
Margin: 0;
}
Body {
Width: 960px;
Margin: 0 auto;
Background: # fff;
}
# Top {
Height: 26px;
Background: red;
Margin: 0 0 10px 0;
}
# Header {
Height: 80px;
Background: green;
Margin: 0 0 10px 0;
}
# Nav {
Height: 35px;
Background: navy;
}
# Search {
Height: 35px;
Background: maroon;
Margin: 0 0 10px 0;
}
# User {
Width: 270px;
Height: 400px;
Background: orange;
Float: right;
Margin: 0 0 10px 0;
}
# News {
Width: 400px;
Height: 400px;
Background: blue;
Float: right;
Margin: 0 10px 10px 0;
}
# Pic {
Width: 270px;
Height: 195px;
Background: green;
Float: left;
Margin: 0 0 10px 0;
}
# Rec {
Width: 270px;
Height: 195px;
Background: red;
Float: left;
Margin: 0 0 10px 0;
}
# Sidebar-right {
Width: 270px;
Height: 835px;
Background: red;
Float: right;
Margin: 0 0 10px 0;
}
# Picnews {
Width: 680px;
Height: 200px;
Background: yellow;
Float: left;
Margin: 0 0 10px 0;
}
# Newslist {
Width: 680px;
Height: 625px;
Background: pink;
Float: left;
Margin: 0 0 10px 0;
}
# Link {
Width: 960px;
Height: 110px;
Background: orange;
Float: left;
Margin: 0 0 10px 0;
}
# Footer {
Width: 960px;
Height: 40px;
Background: blue;
Float: left;
}

None of them are in Chinese, but they must be declared as UTF-8.
Before the BOM header is declared in UTF-8, it is normal that an error occurs.

None of them are in Chinese, but they must be declared as UTF-8.
Before the BOM header is declared in UTF-8, it is normal that an error occurs.




Great God, I did Charset = utf-8"If you do not delete the BOM header, there will be no error, but what you are talking about is the UTF-8 encoding without the BOM header .....

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.