我试图弄清楚为什么我的 css 不能在 .build 类 div 上工作。我不知道我哪里出错了。HTML:
<!DOCTYPE HTML>
<html>
<head>
<title> Build Projects
(bryan22)
</title>
<link href = 'obpstyle.css' rel = 'stylesheet' type = 'text/css' />
</head>
<body>
<h1> Build Projects </h1>
<strong> bryan22 </strong>
<a class = 'navbut' href = 'index2.php'>Home</a>
<a class = 'navbut' href = 'obpmembers.php'>Members</a>
<a class = 'navbut' href = 'obpfriends.php'>Friends</a>
<a class = 'navbut' href = 'obpmessages.php'>Messages</a>
<a class = 'navbut' href = 'obpmembers.php?view=bryan22'>Profile</a>
<a class = 'navbut' href = 'obpbrowse.php'>Browse Builds</a>
<a class = 'navbut' href = 'obplogout.php'>Log Out</a>
<div class = 'showProfile'> <h3 class = 'heading'>Your Page</h3>
<div id = 'profimg'>
<img src = '../website/users/bryan22/bryan22.jpg' />
</div>
<p class = 'usertext'>
I'm Bryan!
</p>
<form action = '' method = 'post'>
<input type = 'submit' name = 'edit' value = 'Edit' />
</form>
</div>
<div class = 'builds'>
<a href = 'obpbuilds.php?view=bryan22&build=The Danger Ranger'>
<strong>The Danger Ranger</strong>
<br />
</a>
<img src = '../website/users/bryan22/The Danger Ranger/The Danger Ranger.jpg' />
</div>
<div class = 'builds'>
<a href = 'obpbuilds.php?view=bryan22&build=450 monster'>
<strong>450 monster</strong>
<br />
</a>
<img src = '../website/users/bryan22/450 monster/450 monster.jpg' />
</div>
<a href = 'obpmessages.php?view=bryan22'> Your Messages</a>
<a href = 'obpfriends.php?view=bryan22'> Your Friends</a></body>
</html>
CSS:
.builds
{
float:right; !important;
font-family:helvetica;
background-color:red !important;
}
.showProfile
{
/*float:left;*/
background-color:red
}
我真的只是希望构建 div 浮动在 showProfile div 旁边,但甚至背景颜色都不起作用。请给我一些见解。谢谢!