Jump to content

F1Fan

Members
  • Posts

    1,182
  • Joined

  • Last visited

Everything posted by F1Fan

  1. F1Fan

    html layout

    I agree, you could use divs easily. If you really wanted to continue using tables, you need to know how tables work. You have to think of them as rows and columns. Every cell in a given column with be the same width. You are trying to set the first column 20% in the first row, and 40% in the 5th row. Since they have to be the same width, it will use the first assigned value and ignore any others. You could use the least common denominator method. As an example, you have four different widths; 20%, 40%, 60%, and 80%. The least common denominator is 20%. Divide this into each of the widths and you get 1x, 2x, 3x, and 4x. Also, 20% into 100% is 5x, which is how many columns you will need. Then you just span each cell to the dividend listed above. Using this method, your table would look like this: <table width="100%" border="1" align="center"> <tr> <td width="20%">r1 c1 (width should be 20%)</td> <!-- colspan="1" is understood --> <td width="80%" colspan="4"> r1 c2 (width should be 80%) </td> </tr> <tr> <td colspan="5"> </td> </tr> <tr> <td colspan="5"> </td> </tr> <tr> <td colspan="5"> </td> </tr> <tr> <td width="40%" colspan="2">r5 c1 (width should be 40%)</td> <td width="60%" colspan="3">r5 c2 (width should be 60%)</td> <!-- background="images/spacer.gif" --> </tr> <tr> <td colspan="5">footer</td> </tr> </table> Hope this helps!
  2. Use the CSS "overflow" property: Example div{ overflow: scroll; } Possible Values visible - Default. The content is not clipped. It renders outside the element hidden - The content is clipped, but the browser does not display a scroll-bar to see the rest of the content scroll - The content is clipped, but the browser displays a scroll-bar to see the rest of the content auto - If the content is clipped, the browser should display a scroll-bar to see the rest of the content
  3. I think the align="center" as well as the css text-align: center; both center the contents of the div, but do not center the div on the page. So, you could use the old <center></center> tags around the div, or you could make the width of the div 100% on the page. Here are the two options: <center><div style="text-align:center;"><span class="style52">Website Created by <a href="http://www.hyperlinkname.co.uk" target="_blank">click here</a></span></div></center> or <div style="width: 100%; text-align: center;"><span class="style52">Website Created by <a href="http://www.hyperlinkname.co.uk" target="_blank">click here</a></span></div>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.