怎么不能将这个元素集中在这个jQuery iframe(div?)中

时间:2010-04-28 10:07:41

标签: jquery iframe

我无法将iframe中的元素置于此页面的中心位置:

http://ada.kiexpro.com/test/instruments.html

(点击打开iFrame模式

HTML:

   <h2>Intrument's name</h2>
    <p>View full-size photo <a href="iframeModal.html?placeValuesBeforeTB_=savedValues&TB_iframe=true&height=500&width=320&modal=true" title="add a caption to title attribute / or leave blank" class="thickbox">here</a>

iframe的css:

#desc img, h3, p {
    float: left;
    display: block;
    margin: 8px 0px;
}
#desc input {
    float: right;
    font-weight: 700;
    background-image:url("../images/close.png");
    background-repeat: no-repeat;
    border-width: 0;
    margin: 0 0 10px;
    padding:0 12px 6px;
    background-color: #FFF;
}
#desc input:hover {
    background-image:url("../images/close_hover.png");
    background-repeat: no-repeat;
}
#mainpic {
    border: 5px solid #DDD;
}
#desc h3 {
    line-height: 6px;
    background: url("../images/goldenrose.gif") no-repeat left;
    padding: 13px 42px;
}
#desc p {
    color: #888;
}

1 个答案:

答案 0 :(得分:1)

你是说这张照片吗? - &GT;添加text-align:center;到身体和文本对齐:左;到图片后面的div(desc)。

相关问题