English 中文(简体)
在有边界时,分配百分数以tab计
原标题:assigning percentage width to tabs while they have borders
  • 时间:2012-01-14 05:24:31
  •  标签:
  • jquery
  • css

请审议: http://jsfiddle.net/CASM6/9/“rel=“nofollow” http://jsfiddle.net/CASM6/9/。

我有两行刺。 第一行有两条表格,第二行有三条表格。 我希望所有这些表象都直截了一起,外部边界完全吻合。 如果没有边界,就会很容易。 上表表的宽度为50%,下表的宽度为33.3333%。 但是,较低的表格有边界。 而这些边界的宽度则会 things。 我如何取得预期成果? 感谢!

最佳回答

这很可能不是你想要听到的,但如果你想把百分比和百分数相混合,你会用一个额外的包裹来最容易的时间。 也就是说,如果你想要达到accurate

我在<条码>div中摘录了你的<条码>。

Demo: http://jsfiddle.net/CASM6/13/

<ul>
    <li id= left-btm ><div>Bottom 1</div></li>
    <li><div>Bottom 2</div></li>
    <li id= right-btm ><div>Bottom 3</div></li>
</ul>  
#bottom li {
    background-color:red;
    width:33.33%; /* as close as we can get to 1/3... */
}

#left-btm div, #right-btm div
{
    border-left-color:black;
    border-right-color:black;   
    border-left-width:medium;
    border-right-width:medium;
    border-left-style:solid;
    border-right-style:solid;
}

除此条外,“<>0.1%/代码”从将集装箱分割成不完善的容器中分离出来,外在每一例情况下都是完美的。 可以通过在与边界相匹配的集装箱上设置<条码>后地-color来弥补这一损失。

You can fiddle around with fractions of ems and percentages all day, but you can never get them perfect because they are relative widths, unlike px. This might work if you know the exact pixel width of your container, but then if that s the case you could have just used px unites to measure everything. This method ensures accuracy at any width.

问题回答

暂无回答




相关问题
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: ...

热门标签