JimmyNavio
01-24-2007, 03:49 AM
I just finished coding up my site, boonkill.com (http://www.boonkill.com) and everything seemed to be just right, but the whole time I was testing with Firefox and IE 7, and wanted to make sure i had all the browsers covered, so I submitted my site to browsershots.org/ (http://www.browsershots.org/) and from this screen shot (http://browsershots.org/png/full/de/dedbbb23e19272b9af88d3fe1c5215e0.png) I noticed that in IE 6 (and older) my sidebar is not lining up. I have tried everything, and i can get it to line up in one or the other (IE 6 or Firefox), but not both.
Here's the code for the sidebar:
<div class="sidebar">
<h2>Latest Posts</h2>
<ul class="list1">
<?
mysql_connect($dbserver,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$count = 15;
$query="SELECT post_title, ID FROM bk_posts ORDER BY ID DESC LIMIT 0, $count";
$result=mysql_query($query);
mysql_close();
for ($i = 0; $i < $count; $i++) {
$title=mysql_result($result,$i,"post_title");
$id=mysql_result($result,$i,"ID");
echo "<li><a href=\"?p=post&id=$id\">$title</a></li>";
}
?>
</ul>
</div>
and here's the css for the sidebar:
.sidebar {
padding:0 0 20px 0;
width:212px;
margin-left:544px;
}
.sidebar p {
margin:20px 0 0 0;
text-align: center;
}
.sidebar h2 {
color:white;
font-size:1em;
margin:20px 0 0 0;
padding:2px;
background-color:black;
}
.sidebar ul.list1 {
list-style:none;
margin:0;
padding:0;
border-bottom:1px solid black;
background-color:#9AD4F6;
}
.sidebar ul li {
display:block;
padding:0;
margin:0;
border-bottom:1px solid white;
}
.sidebar ul li a, .sidebar ul li a:link, .sidebar ul li a:visited {
display:block;
color:black;
text-decoration:none;
padding:2px;
}
.sidebar ul.list1 li a:hover {
background-color:#CBE7F8;
margin:0;
padding:2px;
}
Any help would be much appreciated. Thank you in advance.
Here's the code for the sidebar:
<div class="sidebar">
<h2>Latest Posts</h2>
<ul class="list1">
<?
mysql_connect($dbserver,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$count = 15;
$query="SELECT post_title, ID FROM bk_posts ORDER BY ID DESC LIMIT 0, $count";
$result=mysql_query($query);
mysql_close();
for ($i = 0; $i < $count; $i++) {
$title=mysql_result($result,$i,"post_title");
$id=mysql_result($result,$i,"ID");
echo "<li><a href=\"?p=post&id=$id\">$title</a></li>";
}
?>
</ul>
</div>
and here's the css for the sidebar:
.sidebar {
padding:0 0 20px 0;
width:212px;
margin-left:544px;
}
.sidebar p {
margin:20px 0 0 0;
text-align: center;
}
.sidebar h2 {
color:white;
font-size:1em;
margin:20px 0 0 0;
padding:2px;
background-color:black;
}
.sidebar ul.list1 {
list-style:none;
margin:0;
padding:0;
border-bottom:1px solid black;
background-color:#9AD4F6;
}
.sidebar ul li {
display:block;
padding:0;
margin:0;
border-bottom:1px solid white;
}
.sidebar ul li a, .sidebar ul li a:link, .sidebar ul li a:visited {
display:block;
color:black;
text-decoration:none;
padding:2px;
}
.sidebar ul.list1 li a:hover {
background-color:#CBE7F8;
margin:0;
padding:2px;
}
Any help would be much appreciated. Thank you in advance.