Forum Moderators: not2easy

Message Too Old, No Replies

Addtion of exceess space under headings

only occur within <td> for block level elephants

         

kittimakai

2:08 pm on Feb 11, 2004 (gmt 0)

10+ Year Member



I mean elements ;)

I am using DW - when I add CSS headings to text within a table cell it places what appear to be a soft return under the text. It leaves my page looking more 'exploded' than I want.

anybody recognise this?

Kitti

grahamstewart

2:33 pm on Feb 11, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Headings have some space under them (and sometimes above them).
You can alter the space by adjusting their margin and padding.

Add..


margin:0;
padding:0;

to the style of the offending headings. (no idea how you actually do this in DW tho, sorry).

kittimakai

2:42 pm on Feb 11, 2004 (gmt 0)

10+ Year Member



This is an example of the CSS for H1 tag

Could you point me to which propery you add the margin:0; padding:0; values to.

h1 {
font-family: Arial;
font-size: 1.4em;
font-weight: bold;
}

Kitti

grahamstewart

2:51 pm on Feb 11, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Like this..
h1 {  
font-family: Arial;
font-size: 1.4em;
font-weight: bold;
margin:0;
padding:0;
}

Also you should always include a generic font (such as serif or sans-serif) and you can combine the different font properties to save space. so it should look like this..

h1 { 
font: bold 1.4em Arial, sans-serif;
margin:0;
padding:0;
}

kittimakai

3:02 pm on Feb 11, 2004 (gmt 0)

10+ Year Member



Thanks graham

that has worked a treat.

I removed some of the clutter that DW put in for ease of description - however I always add helvetica - is it necessary or will sans serif suffice for Mac users/cover all bases?

Kitti

grahamstewart

3:12 pm on Feb 11, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



sans-serif is a generic font and it is defined for every browser that supports CSS. It is usually just mapped to another font (typically Arial on the PC, not sure about Mac).

The fonts are applied in order so if you code...

font: bold Arial, Helvetica, sans-serif;

Then you are saying I want a bold font in the Arial family, but if there is no Arial available then try Helvetica; and if there is no Helvetica then use sans-serif.

Since you can't control what font sans-serif is actually mapped to I tend to use it as the last option after my preferred fonts.

kittimakai

3:27 pm on Feb 11, 2004 (gmt 0)

10+ Year Member



I see

Makes sense - I seem to remember that newer macs all have Arial as well as helvetica.

Thanks

Kitti