PDA

View Full Version : Text problem with Div Tag


safesurfer65
01-12-2010, 06:27 PM
Hi all

Im sure this is easily explained by someone familiar with Dreamweaver CS4.
Problem is when I insert a Div Tag and then create a CSS style with box size, font style etc. I then start typing text, when I shift enter to go to the second line a space appears at the top of the Div Tag and the 1st line of text. I dont want this. I cant see any way of changing it so that the text starts at the top left side of the Tag and getting rid of this annoying space. I have to adjust the position of the tag to get it to line up properly. It looks fine in Firefox but when viewed in IE it looks all wrong. Any ideas where Im going wrong here ? Any help would be much appreciated as its driving me nuts.

Cheers

Mark

DWcourse
01-12-2010, 06:40 PM
If we could see an example or at least your code it would help.

safesurfer65
01-12-2010, 06:49 PM
Hi

Here's a link that shows my problem, ok in Firefox but wrong in IE.

http://www.banchorypcs.co.uk/

Thx

Mark

safesurfer65
01-12-2010, 07:17 PM
Hi

Cracked it, new it would be something obvious. I removed the </p> tag and it was sorted.

Cheers

Mark

d a v e
01-12-2010, 08:11 PM
you should leave the <p> in because it is a paragraph and then use this for your #apDiv4 {... top:98px; }

incidentally underlining text that isn't a link is confusing to users that will then try to click on it.

Corrosive
01-13-2010, 06:44 AM
Or you could zero the margins and padding for paragraphs;

p {margin:0; padding:0;}

safesurfer65
01-13-2010, 07:17 AM
Hey guys

Thanks for the help, very much appreciated.

Cheers

Mark

d a v e
01-13-2010, 01:52 PM
Or you could zero the margins and padding for paragraphs;

p {margin:0; padding:0;}
although that will also remove the spacing before after the other paragraphs as well as the space from top of the div - which may not be what you want.

Corrosive
01-13-2010, 01:56 PM
Yeah, agreed. This is one of the many reasons why design view gets real tired, real quick and you end up just learning HTML/CSS anyway.