[問題] 要怎麼讓兩個div相鄰呢
最近剛學div標籤 遇到瓶頸
就是我一連串標籤寫下來
想讓兩個標籤左右相鄰 但是它們怎麼試都會變上下
以下是html的語法
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"" rel="nofollow">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="" rel="nofollow">http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>無標題文件</title>
<style type="text/css">
<!--
@import url("css.css");
body {
background-color: #333333;
}
-->
</style>
</head>
<body>
<div class="top">123</div>
<div class="medd">456</div>
</body>
</html>
CSS語法是
@charset "utf-8";
/* CSS Document */
.top {
width: 20px;
padding-left: 300px;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 14px;
color: #FF0000;
}
.medd {
font-size: 12px;
color: #00FF00;
height: 20px;
width: 100px;
}
已經試了整個早上了
我想應該是有個簡單的概念沒弄通吧
麻煩大家指點我一下吧 感謝!
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 114.45.186.47
推
09/09 12:54, , 1F
09/09 12:54, 1F
→
09/09 12:55, , 2F
09/09 12:55, 2F
推
09/09 13:00, , 3F
09/09 13:00, 3F
→
09/09 14:03, , 4F
09/09 14:03, 4F
→
09/09 17:57, , 5F
09/09 17:57, 5F
推
09/10 12:55, , 6F
09/10 12:55, 6F
→
09/10 12:56, , 7F
09/10 12:56, 7F
推
09/10 21:31, , 8F
09/10 21:31, 8F
推
09/11 19:42, , 9F
09/11 19:42, 9F
推
09/11 20:20, , 10F
09/11 20:20, 10F
推
10/08 15:02, , 11F
10/08 15:02, 11F