Simple Dreamweaver Problem - Tables

Soldato
Joined
27 Jun 2006
Posts
6,234
I feel quite silly posting this - but I've bashed about the thing for a while and can't seem to get anything good to come of it.

I have drawn out a lovely diagram of the problem:

dreamweaverns8.jpg


2 seperate tables there - one houses the logo and buttons (but x) and the other houses the block of text.

I'm basically just messing about - designing a few bits and pieces and I'm doing so in Dreamweaver, because my raw coding knowledge wouldn't get me very far at all.

After much messing around, I wanted to have everything centred (in terms of tables) but cannot seem to get the text block table, to centre in line with the table housing the logos/buttons - with or without text in it.

The tables are both set up the exact same way (size and alignment) yet the text block table feels the need to jump out at the left a bit and then zoom away off to the right - as shown in the bold table in the 'result' section of the image.

I have tried both Firefox and IE browsers - both give the same result. The only time the table looks correct is when the browser is 'restored down' to a smaller size - perhaps I am working on the wrong size?

Is there any way to have everything centred - so all the tables sit in the centre of the screen aligned with eachother?

I have used the 'centre' tags before and after both tables, by the way.

If you need the coding, just let me know and I'll fire it up if I can.

Thanks.
 
Yeah post us the HTML.

It sounds like a simple sizing problem, we could probably figure out with guess work, but it would just be quicker if you copied the HTML into here.
 
iCraig said:
Yeah post us the HTML.

It sounds like a simple sizing problem, we could probably figure out with guess work, but it would just be quicker if you copied the HTML into here.

I thought that might be required, but didn't want to be digging it up last night / early this morning.

Code:
<body>
<center>
  <table width="60%" height="153" border="0" align="center">
    <tr>
      <th width="43%" scope="col"><img src="logo.jpg" width="239" height="147" /></th>
      <th width="18%" scope="col"><div align="left"><img src="Home Button.jpg" width="100" height="30" /><br />
          <img src="grid.jpg" width="100" height="30" /><br />
          <img src="Why.jpg" width="100" height="30" /></div></th>
      <th width="39%" scope="col"><p align="left"><img src="FAQ.jpg" width="100" height="30" /><br />
        <img src="tandc.jpg" width="100" height="30" /><br />
      <img src="contact.jpg" width="100" height="30" /></p>      </th>
    </tr>
  </table>
  
  <table width="60%" height="153" border="1" align="center">
    <tr>
      <th width="4%" scope="col"></th>
    </tr>
  </table>
</center>
</body>

I'm not very good with the actual code, so I can't exactly see where I've gone wrong.
 
Try changing your setting to pixels rather than % when you first create table you should find that easier to see what your doing then you always change certain parts to % when you need it to stretch
Plus why don t you put it all in one table.
 
EKsparky said:
Plus why don t you put it all in one table.

It would be ideal. However, I'm not sure how it is possible given Dreamweaver's settings.

table2ve2.png


I'm unable to put text across the second row, due to the column restrictions. Probably a way around that of course - but I'm not experienced in the ways, hence why I'm using DW. ;)
 
Maybe use colspan on the second td of the second row. This will span the table data tag across a set number of columns

Code:
  <table width="60%" height="153" border="0" align="center">
    <tr>
      <th width="43%" scope="col"><img src="logo.jpg" width="239" height="147" /></th>
      <th width="18%" scope="col"><div align="left"><img src="Home Button.jpg" width="100" height="30" /><br />
          <img src="grid.jpg" width="100" height="30" /><br />
          <img src="Why.jpg" width="100" height="30" /></div></th>
      <th width="39%" scope="col"><p align="left"><img src="FAQ.jpg" width="100" height="30" /><br />
        <img src="tandc.jpg" width="100" height="30" /><br />
      <img src="contact.jpg" width="100" height="30" /></p>      </th>
    </tr>
    <tr>
		<td>&nbsp;</td>
		<td colspan="2">This is spanned across two columns</td>
    </tr>
  </table>
 
theMAD2 said:
Maybe use colspan on the second td of the second row. This will span the table data tag across a set number of columns

<snip>

Unfortunately that didn't work mate. The text went into the right hand side column.

And in messing about I just found the cure, select both columns in the row and go to 'merge cells'. :o
 
This works in D/Weaver 4

<table width="500
" border="1" cellspacing="0" cellpadding="0" height="267">
<tr>
<td width="200" rowspan="3">
<div align="center"></div>
</td>
<td width="100" height="45">
<div align="center"></div>
</td>
<td width="100" height="45">
<div align="center"></div>
</td>
</tr>
<tr>
<td width="100" height="40">
<div align="center"></div>
</td>
<td width="100" height="40">
<div align="center"></div>
</td>
</tr>
<tr>
<td width="100" height="44">
<div align="center"></div>
</td>
<td width="100">
<div align="center"></div>
</td>
</tr>
<tr>
<td colspan="3">
<div align="center"></div>
<div align="center"></div>
</td>
</tr>
</table>
 
Its simple HTML, if you could be more specific i'll write the code for you.

You have fixed width images, in % sized table cells aligned using divs with no parameters.

Draw me a basic picture thats more specific to how you want the table, its pretty much all possible, though HTML does have its limitations.
 
I got it sorted in the end. It was a simple 'merge' option that I hadn't noticied and I opted against the percentage width option.

In regards to HTML, how safe is it? I understand sites get hacked for different numbers of reasons and as I haven't created my own website - I'm not really sure what to look out for.

Is the HTML safe enough or is hacking more related to folder settings in the FTP etc.

Cheers. :)
 
Back
Top Bottom