在资源管理器中显示页面

发布于 2024-09-19 04:41:24 字数 3668 浏览 3 评论 0原文

我有这段代码(必须将 t 分成 4 部分才能显示正常):

<div class="list_item" id="item_1">
<div class="list_item_int">Andrés Bedoya</div>
<div class="list_item_big" title="Soy Andr s Bedoya el programador de este maravilloso software">Soy Andr s Bedoya el programador de este maravilloso software</div>
<div class="list_item_big" title="Este es un trabajo de prueba para confirmar que todo funcione correctamente">Este es un trabajo de prueba para confirmar que todo...</div>
<div class="list_item_small"><a href="php/judge_detail.php?work_id=1">Archivos inscritos</a></div>
<div class="eval_buttons">
    <div class="approve" id="approve_1"></div>
    <div class="dismiss" id="dismiss_1"></div>
</div>

<div class="list_item" id="item_2">
<div class="list_item_int">Alexandra Márquez</div>
<div class="list_item_big" title="Soy la esposa de Yo">Soy la esposa de Yo</div>
<div class="list_item_big" title="Prueba corta">Prueba corta</div>
<div class="list_item_small"><a href="php/judge_detail.php?work_id=2">Archivos inscritos</a></div>
<div class="eval_buttons">
    <div class="approve" id="approve_2"></div>
    <div class="dismiss" id="dismiss_2"></div>
</div>

<div class="list_item" id="item_5">
<div class="list_item_int">Pedro Pérez</div>
<div class="list_item_big" title="Prueba o al menos eso creo personaje inventado">Prueba o al menos eso creo personaje inventado</div>
<div class="list_item_big" title="Este trabajo es el tercero de la categorà a Negocios tipo Individual que se escribe y espero que me solucione el problema de las là neas hacia abajo y los botones que se borran">Este trabajo es el tercero de la categorà a Negocios tipo Individual...</div>
<div class="list_item_small"><a href="php/judge_detail.php?work_id=5">Archivos inscritos</a></div>
<div class="eval_buttons">
    <div class="approve" id="approve_5"></div>
    <div class="dismiss" id="dismiss_5"></div>
</div>

<div class="clear"></div>

这个 CSS 来显示它:

.list_item{ height: 48px; line-height: 24px; background: transparent url(images/bg_list_item.png) no-repeat scroll bottom; font-size: 0.7em; float: left; width: 100%; }
.list_item .list_item_int{ float: left; width: 230px; text-align: left; text-indent: 20px; font-size: 1em; font-weight: bold; }
.list_item .list_item_big{ float: left; width: 200px; text-align: justify; margin: 0px 10px 0px 0px; }
.list_item .list_item_small{ float: left; width: 130px; text-align: center; }
.list_item .eval_buttons{ width: 200px; height: 38px; float: left; line-height: 48px; margin-left: 10px; margin-top: 10px; }
.list_item .eval_buttons .approve{ width: 93px; height: 25px; cursor: pointer; background: transparent url(images/boton_aprobar.png) no-repeat scroll top; float: left; }
.list_item .eval_buttons .dismiss{ width: 93px; height: 25px; cursor: pointer; background: transparent url(images/boton_descartar.png) no-repeat scroll top; float: right; }
.list_item a{ color: #195e87; text-decoration: none; font-weight: bold; }
.list_item a:hover{ text-decoration: underline; }

但是我一直遇到在 IE8 中正确显示它的问题,而我在 Firefox 或 Google chrome 上没有问题(请查看链接以查看它):


查看问题

有办法解决吗?

I have this code (had to split t in 4 sections to display ok):

<div class="list_item" id="item_1">
<div class="list_item_int">Andrés Bedoya</div>
<div class="list_item_big" title="Soy Andr s Bedoya el programador de este maravilloso software">Soy Andr s Bedoya el programador de este maravilloso software</div>
<div class="list_item_big" title="Este es un trabajo de prueba para confirmar que todo funcione correctamente">Este es un trabajo de prueba para confirmar que todo...</div>
<div class="list_item_small"><a href="php/judge_detail.php?work_id=1">Archivos inscritos</a></div>
<div class="eval_buttons">
    <div class="approve" id="approve_1"></div>
    <div class="dismiss" id="dismiss_1"></div>
</div>

<div class="list_item" id="item_2">
<div class="list_item_int">Alexandra Márquez</div>
<div class="list_item_big" title="Soy la esposa de Yo">Soy la esposa de Yo</div>
<div class="list_item_big" title="Prueba corta">Prueba corta</div>
<div class="list_item_small"><a href="php/judge_detail.php?work_id=2">Archivos inscritos</a></div>
<div class="eval_buttons">
    <div class="approve" id="approve_2"></div>
    <div class="dismiss" id="dismiss_2"></div>
</div>

<div class="list_item" id="item_5">
<div class="list_item_int">Pedro Pérez</div>
<div class="list_item_big" title="Prueba o al menos eso creo personaje inventado">Prueba o al menos eso creo personaje inventado</div>
<div class="list_item_big" title="Este trabajo es el tercero de la categorà a Negocios tipo Individual que se escribe y espero que me solucione el problema de las là neas hacia abajo y los botones que se borran">Este trabajo es el tercero de la categorà a Negocios tipo Individual...</div>
<div class="list_item_small"><a href="php/judge_detail.php?work_id=5">Archivos inscritos</a></div>
<div class="eval_buttons">
    <div class="approve" id="approve_5"></div>
    <div class="dismiss" id="dismiss_5"></div>
</div>

<div class="clear"></div>

And this CSS to display it:

.list_item{ height: 48px; line-height: 24px; background: transparent url(images/bg_list_item.png) no-repeat scroll bottom; font-size: 0.7em; float: left; width: 100%; }
.list_item .list_item_int{ float: left; width: 230px; text-align: left; text-indent: 20px; font-size: 1em; font-weight: bold; }
.list_item .list_item_big{ float: left; width: 200px; text-align: justify; margin: 0px 10px 0px 0px; }
.list_item .list_item_small{ float: left; width: 130px; text-align: center; }
.list_item .eval_buttons{ width: 200px; height: 38px; float: left; line-height: 48px; margin-left: 10px; margin-top: 10px; }
.list_item .eval_buttons .approve{ width: 93px; height: 25px; cursor: pointer; background: transparent url(images/boton_aprobar.png) no-repeat scroll top; float: left; }
.list_item .eval_buttons .dismiss{ width: 93px; height: 25px; cursor: pointer; background: transparent url(images/boton_descartar.png) no-repeat scroll top; float: right; }
.list_item a{ color: #195e87; text-decoration: none; font-weight: bold; }
.list_item a:hover{ text-decoration: underline; }

But I keep getting a problem to display it correctly in IE8 while i have no problems with firefox or Google chrome (please take a look at the links to see it):


See the problem

is there a way to fix it?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

童话里做英雄 2024-09-26 04:41:24

您可能会尝试将所有浮动元素替换为具有固定宽度(或百分比宽度)的元素。

You might try to replace all your floats with elements with fixed with (or percentage width).

想念有你 2024-09-26 04:41:24

如果您也给 .dismiss 一个 float:left 而不是 float:right ,会发生什么?

What happens id you give .dismiss a float:left too instead of float:right?

泪是无色的血 2024-09-26 04:41:24

好吧,Litso 有点粗鲁,冒犯了我的代码,但没关系。他让我意识到我可以使用另一种方法来解决问题并轻松解决它。我创建了一个表,并将所有信息放入 trs 和 tds 中...这样,最后一行就不会出错并保留在它应该在的位置。
嗯,谢谢 Litso。我知道我的代码有点差,而且我可能患有“Divitis”,但我只是一个初级程序员。

<tr class="list_item" id="item_1"> 
<td class="list_item_int">Andrés Bedoya</td> 
<td class="list_item_big" title="Soy Andr s Bedoya el programador de este maravilloso software">Soy Andr s Bedoya el programador de este maravilloso software</td> 
<td class="list_item_big" title="Este es un trabajo de prueba para confirmar que todo funcione correctamente">Este es un trabajo de prueba para confirmar que todo...</td> 
<td class="list_item_small"><a href="php/judge_detail.php?work_id=1">Archivos inscritos</a></td> 
<td class="eval_buttons"> 
    <a class="approve" id="approve_1"></a> 
    <a class="dismiss" id="dismiss_1"></a> 
</td>
</tr>

Well, Litso was kinda rude, offending my code, but it was ok. He made me realise that i could use another approach to the problem and solve it easily. I created a table and put all the information in trs and tds... this way, the last line never goes wrong and stays where it's supposed to be.
Well, thanks to Litso for that. I know my code is kinda poor, and i might suffer of "Divitis", but i'm just a junior programmer.

<tr class="list_item" id="item_1"> 
<td class="list_item_int">Andrés Bedoya</td> 
<td class="list_item_big" title="Soy Andr s Bedoya el programador de este maravilloso software">Soy Andr s Bedoya el programador de este maravilloso software</td> 
<td class="list_item_big" title="Este es un trabajo de prueba para confirmar que todo funcione correctamente">Este es un trabajo de prueba para confirmar que todo...</td> 
<td class="list_item_small"><a href="php/judge_detail.php?work_id=1">Archivos inscritos</a></td> 
<td class="eval_buttons"> 
    <a class="approve" id="approve_1"></a> 
    <a class="dismiss" id="dismiss_1"></a> 
</td>
</tr>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文