What is the html code..??

sahan123

Beta member
Messages
1
What is the html code to make horizontal boxes? I need to make some boxes go from left to right, but all I can find is on top of each other. You can see example here <a href="http://www.carinsurancequotesinformation.com & quot;>car insurance quotes</a> where the boxes are next to each other, and will this affect the page width on my site.
Someone told me use DIV tags, but how do I put this in HTML code?.
 
that site uses a html table. one row, four columns

Code:
<table>
  <tr>
      <td>1-1</td>
      <td>1-2</td>
      <td>1-3</td>
      <td>1-4</td>
  </tr>
</table>
 
What is the html code to make horizontal boxes? I need to make some boxes go from left to right, but all I can find is on top of each other. You can see example here <a href="Compare Car Insurance Quotes & quot;>car insurance quotes</a> where the boxes are next to each other, and will this affect the page width on my site.
Someone told me use DIV tags, but how do I put this in HTML code?.

Hi there,
The code follows.
<table>
<tr>
<td>1-1</td>
<td>1-2</td>
<td>1-3</td>
<td>1-4</td>
</tr>
</table>

:),
TechWiz
 
I would also advise using divs and not tables.

I wrote this quick code which should help you out:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>HTML Template</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <script type="text/javascript" src="jquery-1.8.3.js"></script>
<style type="text/css">

div
{
    background: red;
    width: 20%;
    height: 200px;
    margin: 1%;
    display: inline-block;
}

</style>

</head>

<body>

<div id="div1"></div>
<div id="div2"></div>
<div id="div3"></div>
<div id="div4"></div>

</body>
</html>

Hope it helps,

Kind regards,

Labby.
 
Back
Top Bottom