首页 > 解决方案 > 如何将 td 元素放在 h1 元素旁边?

问题描述

可能是一个基本问题,但我将如何在标题旁边放置一张表格?我想做什么的图片

以下是代码的一小部分,但它应该涵盖标题和我想要移动到 h1 元素旁边的图像之一。


        #header 
        {
            background-color:#E3BA00;
            color:black;
            width:918px;
            text-align:center;
            padding:5px;
        }

        </style>

    </head>

    <!-- Now the body of the page is defined. -->

    <body>

        <div id="header">
        <h1>English To Swedish Translator</h1>
        <h2>By fgfgfg <h2>
        </div>


        <!-- A table is now created where key elements can be organized. -->

        <table border="0" cellpadding="7" cellspacing="0" bgcolor="#006A8B">

          <!-- Start a new row... -->
          <tr>

         <td>
            <img src    = "http:thelink"
            width       = "150"
            height      = "90"
            border      = "0">
          </td>

标签: html

解决方案


我只需要使用 html 元素 align 将其左右对齐。


推荐阅读