作者victer0327 (victory)
看板Web_Design
標題[問題] CSS關於<ul>,<li>的問題
時間Thu Oct 15 09:25:17 2009
我用<ul>,<li>做button
[CSS]
a:link {
color: #333;
text-decoration: none;
padding-top: 5px;
padding-right: 15px;
padding-bottom: 5px;
padding-left: 15px;
border: 1px solid #333;
}
[HTML]
<ul>
<li>button1</li>
<br />
<li>button2</li>
<br />
.
.
.
--------------------------------以下是圖解-----------------------------------
在本機上看是長這樣:
----------
| Button1 |
----------
----------
| Button2 |
----------
但在別人電腦連到自己的看卻變成:
----------
| Button1 |
|---------|
|---------|
| Button2 |
----------- <-------------兩個外框疊在一起了,只為保持文字間距
似乎是<ul>,<li>只讀到自己,完全不理<br>,請問該怎麼解決,讓他們正常勒?
--
你在幹麻? 我在擺爛阿
○ 火
/■\ ○/
/\ ╴/▔\
□□□□火闌火闌火闌火闌火闌 □□□□
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.111.166.142
※ 編輯: victer0327 來自: 140.111.166.142 (10/15 09:39)
→ ybite:<ul>裡頭不要塞<br /> Orz 這樣是在考驗瀏覽器的判讀 囧 10/15 09:51
→ ybite:需要間隔考慮對li下margin-top和margin-bottom 10/15 09:51
→ victer0327:嗯,感謝。我剛看完後試出來了^^ 10/15 10:57