开发者

html - placing tables in destination places

开发者 https://www.devze.com 2023-03-21 05:40 出处:网络
I can\'t get right positions f开发者_运维问答or my tables. I have code like this: <div style=\"width: 1270px;\">

I can't get right positions f开发者_运维问答or my tables. I have code like this:

<div style="width: 1270px;">
  <div>
   <table style="float:left>
    <tr><td>something1</td></tr>
    <tr><td>something2</td></tr>
   </table>
   <img src="some_sorce">
   <table style="float:left>
    <tr><td>something3</td></tr>
    <tr><td>something4</td></tr>
   </table>
  </div>
</div>

And I have two problems: First I want tables to be placed in bottom of containing div. I try some kind of "vertical-align" in some places but it fail for me. Secoundly i want the image to be in center of div, "text-align: center" don't do the trick. Could someone help me anyhow?


Instead of:

<table>
<img src="some_sorce">

it should be:

</table>
<img src="some_sorce">

And by default images have display: inline attribute so You need to do something like:

<img src="some_sorce" style="display: block">

to center image

0

精彩评论

暂无评论...
验证码 换一张
取 消