View Full Version : Table and text under Too much space!

03-05-2010, 07:08 PM
Hi is there a simple answer or am i doing all wrong (building my own first site)
I've been trying all kinds of options and can't seem to make the white space between the tabel and the following text smaller, right under. When I put it into the table it looks worse. In the Live view it comes accross as being two lines under -all lost. Can't find the CSS of the table. All padding is 0 in properties. I'm using a simple table on several pages to make sure the distance is all the same between costs and the 'algemeen voorwaarden' (dutch)

Dankje wel!
<table width="100%" align="left">
<th width="59%" nowrap="nowrap" class="table_text" scope="col">Indicatie van de architectenkosten<span class="bodytext"><span class="bodyheader"><span class="MenuBarItemIE"><span class="table_text">:</span></span></span></span></th>
<th width="41%" class="table_text" scope="col"><span class="bodytext">900,- *</span></th>
<p class="bodytext">&nbsp;</p>
<p class="bodytext"><span class="Bodytextsmall"><span class="Bodytextsmall">*Zie algemene voorwaarden</span> en voorbeeld contract PDF</span></p>
<p class="bodytext"><img src="website fotos/dakterras_amsterdam_zommer.jpg" width="239" height="159" alt="dakterras_amsterdam_oudzuid" /> <img src="website fotos/dakterras_amsterdam_oudzuid.jpg" width="239" height="160" alt="dakterras_amsterdam_zommer" /></p>

03-05-2010, 07:41 PM
Start by getting rid of the align="left" in your table tag. It doesn't make any sense with the table width set to 100%

<table width="100%">

Then delete empty paragraph (<p class="bodytext">&nbsp;</p>) after the table.

And finally, create a style class rule like this one:

.paraAfterTable {
margin-top: 12px;

Set the margin to whatever you want and apply it to the first paragraph after the table.

While it's correct to use tables for tabular data as you appear to be. You should really be using CSS to define the appearance of your table and other objects. And you're use of span tags seems to indicate your a bit confused about CSS.

03-05-2010, 08:14 PM
Thanks Jc
I'm actually loving CSS, like paragraph styles in InDesign, I think the span is from MSword

03-05-2010, 09:26 PM
Jc if your still around, what the code to put text directly under an image I used your code as base put it didn't really change anything:
<div class="Bodytextsmall" .paraAfterImage {margin top-15px;}>Appartement interieurverbouwing 65m, Amsterdam</div>

Thanks Roly

03-05-2010, 09:33 PM
The code .paraAfterImage {margin top-15px;} should go in your style sheet.

Then you call the the in the p tag for the first paragraph below the table:

<p class="bodytext paraAfterImage">

Although you don't really need to define a bodytext CSS class rule and apply it to every paragraph. You can simply define a body CSS tag rule which would apply to all your page's text (but not inside the table) and override it when necessary.

Again, you need to start learning CSS.