I'm running into CSS problems. anilink The header class works great, but the anibg1&2 classes don't follow their css. it should look like http://impur.no-ip.org/ac/images/ex.png[/img]
Can i get some help? ^_^
Can i get some help? ^_^
<head>
<link rel="stylesheet" href="./style/index.css" type="text/css" />
</head>
<div class="leftside">
<div class="anihead">A</div>
<div class="anibg2"><div class="name"><a href="http://animecasting.com/a-d/Air_font.html">Air</a></div> <div class="num">(10)</div></div><br>
<div class="anibg1"><div class="name"><a href="http://animecasting.com/a-d/Aishiteru_ze_Baby_font.html">Aishiteru_ze_Baby</a></div><div class="num">(26)</div></div><br>
<div class="anibg2"><div class="name"><a href="http://animecasting.com/a-d/Akahori_Gedou_Hour_Rabuge_front.html">Akahori_Gedou_Hour_Rabuge</a></div> <div class="num">(12)</div></div><br>
<div class="anibg1"><div class="name"><a href="http://animecasting.com/a-d/Akazukin_Chacha_front.html">Akazukin_Chacha</a></div><div class="num">(72)</div></div><br>
</div>
<div class="anibg1"><div class="name">Name</div><div class="num">(num)</div></div><br>
<div class="anibg2"><div class="name">Name</div><div class="num">(num)</div></div><br>
<div class="rightside">
<div class="anihead">M</div>
<div class="anibg2"><div class="name">Name</div><div class="num">(num)</div></div><br>
<div class="anibg1"><div class="name">Name</div><div class="num">(num)</div></div><br>
</div>
html, body{
margin:0;
padding:0;
text-align:center;
background-color:#ff99cc;
}
#pagewidth{
width:750px;
text-align:left;
margin-left:auto;
margin-right:auto;
}
#header{
position:relative;
height:90px;
background-image:url("../images/top-tile-bar.jpg");
background-repeat:no-repeat;
background-position:center center;
width:750px;
}
#leftcol{
width:150px;
float:left;
position:relative;
}
#maincol
{
width:600px;
background-color: #ffffcc;
float: right;
display:inline;
position: relative;
}
.conheadblue
{
background-color:#0000ee;
color:White;
text-align:center;
font-size:x-large;
}
.conheadred
{
background-color:#bb0000;
color:White;
}
#footer{
height:20px;
width:100%;
background-color:white;
clear:both;
text-align:left;
line-height:20px;
}
.clearfix:after {
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}
.clearfix{display: inline-block;}
/* Hides from IE-mac \*/
* html .clearfix{height: 1%;}
.clearfix{display: block;}
/* End hide from IE-mac */
.nav
{
background-color:#ffffcc;
border: medium solid #C0C0C0;
}
.navheader
{
background-color:#0000ee;
height:20px;
line-height:20px;
text-align:center;
color:White;
border-bottom: medium solid #c0c0c0;
}
.navbody
{
background-color:#ffffcc;
color:Black;
}
.num
{
float:right;
width:auto;
}
.name
{
float:left;
}
/*printer styles*/
@media print{
/*hide the left column when printing*/
#leftcol{display:none;}
#twocols, #maincol{width:100%; float:none;}
}
.nob
{
border:0;
}
.anihead
{
font-size:xx-large;
background-color:#ddd;
}
.anibg1
{
background-color:#ddd;
}
.anibg2
{
background-color:White;
}
.leftside
{
float:left;
width:45%;
}
.rightside
{
float:right;
width:45%;
}
<head>
<link rel="stylesheet" href="./style/index.css" type="text/css" />
</head>
<div class="leftside">
<div class="anihead">A</div>
<div class="anibg2"><div class="name"><a href="http://animecasting.com/a-d/Air_font.html">Air</a></div> <div class="num">(10)</div></div><br>
<div class="anibg1"><div class="name"><a href="http://animecasting.com/a-d/Aishiteru_ze_Baby_font.html">Aishiteru_ze_Baby</a></div><div class="num">(26)</div></div><br>
<div class="anibg2"><div class="name"><a href="http://animecasting.com/a-d/Akahori_Gedou_Hour_Rabuge_front.html">Akahori_Gedou_Hour_Rabuge</a></div> <div class="num">(12)</div></div><br>
<div class="anibg1"><div class="name"><a href="http://animecasting.com/a-d/Akazukin_Chacha_front.html">Akazukin_Chacha</a></div><div class="num">(72)</div></div><br>
</div>
<div class="rightside">
<div class="anihead">M</div>
<div class="anibg2"><div class="name">Name</div><div class="num">(num)</div></div><br>
<div class="anibg1"><div class="name">Name</div><div class="num">(num)</div></div><br>
<div class="anibg2"><div class="name">Name</div><div class="num">(num)</div></div><br>
<div class="anibg1"><div class="name">Name</div><div class="num">(num)</div></div><br>
</div>
body{
margin:0;
padding:0;
text-align:center;
background-color:#ff99cc;
}
#pagewidth{
width:750px;
text-align:left;
margin-left:auto;
margin-right:auto;
}
#header{
position:relative;
height:90px;
background-image:url("../images/top-tile-bar.jpg");
background-repeat:no-repeat;
background-position:center center;
width:750px;
}
#leftcol{
width:150px;
float:left;
position:relative;
}
#maincol
{
width:600px;
background-color: #ffffcc;
float: right;
display:inline;
position: relative;
}
.conheadblue
{
background-color:#0000ee;
color:White;
text-align:center;
font-size:x-large;
}
.conheadred
{
background-color:#bb0000;
color:White;
}
#footer{
height:20px;
width:100%;
background-color:white;
clear:both;
text-align:left;
line-height:20px;
}
.clearfix:after {
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}
.clearfix{display: inline-block;}
/* Hides from IE-mac \*/
* html .clearfix{height: 1%;}
.clearfix{display: block;}
/* End hide from IE-mac */
.nav
{
background-color:#ffffcc;
border: medium solid #C0C0C0;
}
.navheader
{
background-color:#0000ee;
height:20px;
line-height:20px;
text-align:center;
color:White;
border-bottom: medium solid #c0c0c0;
}
.navbody
{
background-color:#ffffcc;
color:Black;
}
.num
{
float:right;
width:auto;
}
.name
{
float:left;
}
/*printer styles*/
@media print{
/*hide the left column when printing*/
#leftcol{display:none;}
#twocols, #maincol{width:100%; float:none;}
}
.nob
{
border:0;
}
.anihead
{
font-size:xx-large;
background-color:#ddd;
}
.anibg1
{
background-color:#dddddd;
width:100%;
height:19px;
}
.anibg2
{
background-color:#ffffff;
width:100%;
height:19px;
}
.leftside
{
float:left;
width:45%;
}
.rightside
{
float:right;
width:45%;
}
<head>
<link rel="stylesheet" href="./style/index.css" type="text/css" /></head>
<div class="leftside">
<div class="anihead">A</div>
<div class="anibg2"><div class="name"><a href="http://animecasting.com/a-d/Air_font.html">Air</a></div> <div class="num">(10)<br />
</div></div>
<div class="anibg1"><div class="name"><a href="http://animecasting.com/a-d/Aishiteru_ze_Baby_font.html">Aishiteru_ze_Baby</a></div><div class="num">(26)<br />
</div></div>
<div class="anibg2"><div class="name"><a href="http://animecasting.com/a-d/Akahori_Gedou_Hour_Rabuge_front.html">Akahori_Gedou_Hour_Rabuge</a></div> <div class="num">(12)<br />
</div></div>
<div class="anibg1"><div class="name"><a href="http://animecasting.com/a-d/Akazukin_Chacha_front.html">Akazukin_Chacha</a></div><div class="num">(72)<br />
</div></div>
</div>
<div class="rightside">
<div class="anihead">M</div>
<div class="anibg2"><div class="name">Name</div><div class="num">(num)<br />
</div></div>
<div class="anibg1"><div class="name">Name</div><div class="num">(num)<br />
</div></div>
<div class="anibg2"><div class="name">Name</div><div class="num">(num)</div></div><br />
<div class="anibg1"><div class="name">Name</div><div class="num">(num)</div></div><br />
</div>
3 digit hex codes are giving me errors here :sMr. N":1vqrvv5f said:@Xilef: color keywords and three digit hex identifiers are actually completely valid CSS. Keywords are not considered "preferred" methods since the precise values of those keywords may vary from browser to browser where a standard has not been established, but three vs. six digit hex identifiers are just varying levels of specificity.
li:odd {
background-color:#888888
}
<ul class='nav'>
<li>Nav 1
<li class='odd'>Nav 2
...
ul.nav li {
background-color: #AAAAAA;
}
ul.nav li.odd {
background-color:#DDDDDD;
}
<?php
$links = array(
'nav1' => 'nav1.html',
'nav2' => 'nav2.html',
'nav3' => 'nav3.html',
);
echo "<ul class='nav'>";
$index = 0;
foreach ($links as $title => $link) {
echo "<li" . ($index % 2 == 1 ? " class='odd'" : "") . "><a href='" . $link . "'>" . $title . "</a>";
$index++;
}
echo "</ul>";
?>
echo "<div" . ($index % 2 == 1 ? " class='anibg1'" : " class='anibg2'") . "><div class='name'><a href='index.php?p=" . $link . "'>" . $title . "</a></div><div class='num'>(" . $num . ")</div></div>";
<div class='anibg1'><div class='name'><a href='index.php?p=nav1'>Nav1</a><div class='num'>(5)</div></div>
<div class='anibg2'><div class='name'><a href='index.php?p=nav2'>Nav2</a><div class='num'>(3)</div></div>