gpt4 book ai didi

php - Internet Explorer 9 中的意外问题,假设它是由 html/css 引起的

转载 作者:太空宇宙 更新时间:2023-11-04 00:22:31 26 4
gpt4 key购买 nike

我最近开始自定义我的网站,它在除 Internet Explorer 9 之外的所有浏览器中看起来都不错。出于某种原因,我不知从哪里得到了额外的标题(空白)。我真的很难找到问题所在,我尝试在 fire bug 中查找错误,但似乎一切正常。我还使用了 Internet Explorer 9 中的兼容性 View ,它显示了网站在早期版本的 Internet Explorer 中的外观,但问题并未在那里出现,我怀疑它只出现在 ie9 或 ie8 中。

http://inelmo.com

如果您从 ie9 和其他浏览器访问我的网站,例如chrome 你可以清楚地看到问题。我不知道是什么原因造成的,我认为它与 html/css 有关,但它可能与我用来获取文章的 php 有关。

PHP

$sql = mysql_query("SELECT * FROM stories WHERE showing = 1 ORDER BY st_date DESC LIMIT 10") or die (mysql_error("There was an error in connection"));

$storyDisplay = "";
while($row = mysql_fetch_assoc($sql)){
$story_id = $row["id"];
$story_author_name = $row["st_auth"];
$date = $row["st_date"];
$convertedTime = ($myObject -> convert_datetime($date));
$whenStory = ($myObject -> makeAgo($convertedTime));
$story_title = $row["st_title"];
$story_category = $row["st_category"];
$the_story = $row["st_body"];
$verified = $row["showing"];

if ($verified = 1) {
$verified_class = 'class="verified" title="Good Post!"';
} else {
$verified_class = '';
}

//Create random Style
$style_class = array("st_style1","st_style2","st_style3","st_style4");
$random_class = array_rand($style_class, 1);
$div_class = $style_class[$random_class];

//Create random image
$topic_img = array("s1","s2","s3","s4","s5","s6","s7","s8","s9","s10","s11","s12","s13","s14","s15");
$random_img = array_rand($topic_img, 1);
$the_img = $topic_img[$random_img];

$storyDisplay .= '

<div class="'.$div_class.'">
<div class="st_header">
<div class="st_info">
<a href="#"><img class="st_image" src="images/smile/'.$the_img.'.png" alt="image of '.$story_author_name.'"/></a>

<div class="st_title"><a href="http://inelmo.com/view_story.php?id='.$story_id.'">'.$story_title.'</a></div>
<div class="st_auth"><a href="#">by: '.$story_author_name.'</a></div>
</div>
<div class="st_vote">'.$pulse->buttons($story_id).'</div>
</div>
<div class="st_body">
<div class="st_container">
<article>'.$the_story.'</article>
</div>
</div>
<div class="st_footer">
<ul>
<li><time '.$verified_class.' datetime="'.$date.'">'.$verified_img.''.$whenStory.'</time></li>
<li class="st_category"><a class="st_categorya" href="#">'.$story_category.'</a></li>
<li class="st_id"><a class="st_ida" href="#">'.$story_id.'</a></li>
<li class="st_comments"><a class="st_commentsa" href="http://inelmo.com/view_story.php?id='.$story_id.'">Comments</a></li>
</ul>
<div class="st_social">
<div class="addthis_toolbox addthis_default_style"
addthis:url="http://inelmo.com/view_story.php?id='.$story_id.'"
addthis:title="'.$story_title.'"
addthis:description="'.$the_story.'">
<a class="addthis_button_preferred_1"></a>
<a class="addthis_button_preferred_2"></a>
<a class="addthis_button_preferred_3"></a>
<a class="addthis_button_preferred_4"></a>
<a class="addthis_button_preferred_5"></a>
<a class="addthis_button_compact"></a>
<a class="addthis_counter addthis_bubble_style"></a>
</div>
</div>
<br />
</div>
</div><br />
'; // End $storyDisplay
}// Close main while loop

最佳答案

w3c 验证器给出了 12 个错误,大部分是不允许的子关系,因此错误地打开/关闭了标签。您可能会开始着手于此:

http://validator.w3.org/check?uri=http%3A%2F%2Finelmo.com%2F&charset=%28detect+automatically%29&doctype=Inline&group=0

关于php - Internet Explorer 9 中的意外问题,假设它是由 html/css 引起的,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8479565/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com