我的网站问题在IE 9及更低版本中无法正确显示。我使用过HTML5shim并没有纠正这个问题。
该网站在chrome,firefox等方面看起来很棒和很好
我的网站是www.bucurestideals.com,我无法在下面显示HTML代码。
我的主要css代码如下:
body{
width: 700px;
margin: auto;
font-family: sans-serif;
}
/* Set styling for ALL h2 elements*/
h2{
font-size: 39px;
line-height: 43px;
letter-spacing: -1px;
}
/* default anchor styling for the page */
a{
color: #276056;
font-size: 14px;
}
/* Set the hover over of the link */
a:hover {
color: black;
}
/* Set the base font size and line height for all paragraphs */
p{
font-size: 14px;
line-height: 21px;
font-family: 'Roboto', sans-serif;
}
/* Remove the default padding placed by the browser on the]
ul element */
.meta {
padding-left: 0;
/* Override the default of ul margins */
margin: 0 0 8px;
}
/* style the anchor in the UL to have an italic style and
a specific font size */
.meta a, .post_info a{
font-style: italic;
}
/* Style the li of the unordered list to be inline */
.meta li{
display: inline;
}
/* Place a '/' after each list item (li) */
.meta li:after{
content: '\\';
padding: 0 2px;
color: #999;
}
/* hide the last '/' in the list item navigation */
.meta li:last-child:after{
content: none;
}
/* Float the image to the left and add some space
between it and the right floated item
*/
article img{
float: left;
}
/* Style the article's heading - remove default top
margin top and bottom set by the browser
*/
article h2{ margin: 0; }
/* Float the conrinue link to the right */
.continue{
float: right;
}
/* Add the brackets around the continue link*/
.continue:after{
content: ')'
}
.continue:before{
content: '('
}
/* Float the article div to the right and adjust the width
so that it will fit to the right of the left floated
element */
.preview{
float: right;
width: 550px;
}
/* style the post information */
.post_info{
background-color: #f3f3f3;
color: #999;
padding: 3px;
float: left;
/* make sure that all text is the same
size */
font-size: 14px;
}
/* style the post info anchor tag */
.post_info a {
color: #999;
text-decoration: none;
}
.post_info a:hover {
color: black;
}
/* Clear any floats declared above it */
.body {
clear: both;
/* set text color */
color: #575757;
}
非常感谢任何帮助。
谢谢
答案 0 :(得分:2)
将<!DOCTYPE html>
(或其他一些DOCTYPE)添加到HTML文件的开头。
答案 1 :(得分:0)
尽量不要将标记用作网站容器,而是使用div来完成这样的工作。
<body>
<div class='site_container'>
//Every other element
</div>
</body>
不要集中体元素而是集中.site_contaner