B4Print.com

Web Development & Design => Design Applications => Topic started by: DCurry on April 07, 2009, 01:22:38 PM

Title: Line of type drops down after hard return
Post by: DCurry on April 07, 2009, 01:22:38 PM
So, here I am trucking along and trying to wrap my brain around DW, and it's actually going okay. My latest problem is that let's say I draw a div and add some text to it. When I first start typing, the text is aligned at the top of the div. As soon as I start a new paragraph (by using a hard return {that's what she said}), the first line drops down a bit so it is no longer aligned with the top of the div.

As far as I can tell, I don't have any "space before" settings and changing margins and padding to zero doesn't help. It's not the end of the world, just annoying.

Gnubler - any ideas?
Title: Re: Line of type drops down after hard return
Post by: gnubler on April 07, 2009, 01:32:26 PM
Yes. In the CSS do this:

p {padding-top:0; margin-top:0;}

Or, give your first line of text in the div a tag like h3 and put this in the CSS:

h3 {padding-top:0; margin-top:0;}

There are other ways.
Title: Re: Line of type drops down after hard return
Post by: DCurry on April 07, 2009, 01:48:53 PM
So I guess that would be in the CSS of the text, not of the div? I'm a little scared to mess with the external CSS too much because it is used throughout our site (designed by someone else, recently being maintained/edited by me) and I would hate to break something. Maybe I'll try it and see what happens.

I''m done for the day - perhaps I'll tackle it tomorrow.

Thanks!
Title: Re: Line of type drops down after hard return
Post by: gnubler on April 07, 2009, 01:59:53 PM
Then you can just do an internal style sheet, something like this:

.topline {padding-top:0; margin-top:0;}

and in the code like this:

<p class="topline">First line here</p>

Then you don't have to touch the external CSS.
Title: Re: Line of type drops down after hard return
Post by: frailer on April 07, 2009, 07:15:31 PM


That's twice in one week for brownie points, gnub; your reputation's gonna suffer....    :laugh:     Hey, Dan knew where to head, though... :cheesy:

Man, I feel so "old hat" trying to follow threads like that.     :huh:



Title: Re: Line of type drops down after hard return
Post by: gnubler on April 07, 2009, 07:33:25 PM
Quote from: frailer on April 07, 2009, 07:15:31 PMThat's twice in one week for brownie points, gnub; your reputation's gonna suffer.... 

There's been no one to insult lately. Where's Stevieboy? Once Loganblade posts something with his horrendous typing skills I'll be back to normal.
Title: Re: Line of type drops down after hard return
Post by: frailer on April 07, 2009, 09:52:03 PM



Quote from: gnubler on April 07, 2009, 07:33:25 PM....I'll be back to normal.

         :relieved:


Title: Re: Line of type drops down after hard return
Post by: DCurry on April 08, 2009, 09:46:39 AM
I'm still not getting it. I am doing something wrong.
Title: Re: Line of type drops down after hard return
Post by: gnubler on April 08, 2009, 10:49:29 AM
I just Googled it - my suggestion is "correct". I've used it myself. Are you checking in IE? Don't. Give the first paragraph only a special class with no top padding & top margin.  :death:
Title: Re: Line of type drops down after hard return
Post by: DCurry on April 08, 2009, 11:02:29 AM
I do not doubt your correctness in any way. I'm just doing something wrong somewhere. I am previewing in Safari, but it doesn't even look right in DW.

**Just figured it out - I changed the Margin to zero and that did it. I swear I had tried it before to no avail, but who knows what the heck I did at this point.

Thanks!

p.s. - As I was leaving work yesterday, I saw a hawk dive-bomb a squirrel. He sat on it it for several minutes as the squirrel squealed for help, then the hawk flew off with the squirrel dangling from its talons. Glad it wasn't you!
Title: Re: Line of type drops down after hard return
Post by: tapdn on April 08, 2009, 11:06:58 AM
where is Supersquirrel when you really need him!!!