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 .....