English 中文(简体)
三栏和链接
原标题:Three columns and links
  • 时间:2010-11-29 08:29:13
  •  标签:
  • css

This is weird. I have a "wrapper" with three columns like this: http://d.imagehost.org/view/0543/cssproblem

第一栏有照片,第二栏有文字,第三栏有三个链接。 如果第三组只是案文,而不是链接(见相关照片的顶端),但当我与案文脱节时,案文已不再是一边(见相关情况的最底层)。

我只能理解一下该法典有什么错误。 第3栏中的案文即使有链接,也怎么能够毗邻相处?

c :

.wrapper{
margin-left: 45px;
margin-bottom: 4px;
width: 466px;
height: 22px;
}

.first{
width: 22px;
float: left;
}

.second{
width: 266px;
float: left;
}

.third{
width: 178px;
float: right;
}

p.text1 {
font-family: lucida sans unicode, sans-serif;
color: #ffffff;
font-size: 1.2em;
text-align: left;
margin-left: 12px;
margin-top: 3px;
}

p.text2 {
font-family: lucida sans unicode, sans-serif;
color: #ffffff;
font-size: 1em;
text-align: right;
}

a.opt { 
font-family: lucida sans unicode, sans-serif;
color: #ffffff;
font-size: 1em;
text-decoration: none;
}

a.opt:visited { 
font-family: lucida sans unicode, sans-serif;
color: #ffffff;
font-size: 1em;
text-decoration: none;
}

a.opt:active { 
font-family: lucida sans unicode, sans-serif;
color: #ffffff;
font-size: 1em;
text-decoration: none;
}

a.opt:hover { 
font-family: lucida sans unicode, sans-serif;
color: #ffffff;
font-size: 1em;
text-decoration: underline;
}

html:

<div class="wrapper">
<div class="first><img src="image.gif" /> </div>
<div class="second"><p class="text1">Some text here</p></div>
<div class="third"><p class="text2"><a class="opt" href="http://">LINK 1</a> | <a class="opt" href="http://">LINK 2</a> | <a class="opt" href="http://">LINK 3</a></p></div>
</div>
最佳回答

我的猜测是,它载有<条码>float: 右在<条码>上的声明。 开始调整社会保障局,以考虑这一点:

.wrapper{
margin-left: 45px;
margin-bottom: 4px;
overflow: hidden;
width: 466px;
height: 22px;
}

.first{
width: 22px;
float: left;
}

.second{
width: 266px;
float: left;
}

.third{
width: auto;
overflow: hidden;
}

这消除了权利分散的必要性。 这有望使事情变得足够干净。 否则,我会修改我的回答。

问题回答

暂无回答




相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

jquery ui dialog opens only once

I have a button that opens a dialog when clicked. The dialog displays a div that was hidden After I close the dialog by clicking the X icon, the dialog can t be opened again.

Drop down background url in Safari Issue

selectBox.selectCSS { background: url(/Images/replacementSelectBackground.png) top left no-repeat height:auto; } I have an issue in Safari only where the image is not rendering on top ...

CSS specific for Safari

How do you target specifically safari in css with styles?

Aligning textarea in a form

Ive used the following css code to align my form elements: form { position:relative; } form input { position:absolute; left:11em; } However, the textarea element is not aligned correctly with the ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

CSS problem with page footer

I have defined my page footer in the css file as: #footer { position: absolute; height: 50px; text-align: center; background: #66CCCC; bottom: 0px; left: 0px; width: 100%; height: ...

热门标签