471,599 Members | 920 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,599 software developers and data experts.

headline question..

hi,

what is best way when you need a headline w/large font and a paragr
right underneath it with NO blank lines in between?

<h1>, <divinsert autom. spacing below them.. <spanyou can't do
margins or padding..

so what is best way to do this.. (apart from tables..)

thank you very much...


Nov 1 '07 #1
5 1768
On Thu, 01 Nov 2007 21:13:46 +0100, maya <ma********@yahoo.comwrote:
what is best way when you need a headline w/large font and a paragr
right underneath it with NO blank lines in between?
Setting the the margin-bottom and margin-top of those 2 repectively to 0.
And just use an Hx & P element if that's semantically correct. The more or
less 'anonymous' div and span are grossly overused.
--
Rik Wasmus
Nov 1 '07 #2
Scripsit maya:
what is best way when you need a headline w/large font and a paragr
right underneath it with NO blank lines in between?
To learn and use the basics of CSS. Instead of asking to be spoonfed, read
at least a short good tutorial on CSS.

I'll just point out some incorrect assumptions:
<h1>, <divinsert autom. spacing below them..
While <h1elements generally have some bottom margin set in browsers'
default style sheets, <divelements haven't.
<spanyou can't do margins or padding..
Oh yes you can. Vertical margins are ignored, though, unless you set the
display property to a value other than the default (inline).

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Nov 2 '07 #3
Jukka K. Korpela wrote:
Scripsit maya:
>what is best way when you need a headline w/large font and a paragr
right underneath it with NO blank lines in between?

To learn and use the basics of CSS. Instead of asking to be spoonfed,
read at least a short good tutorial on CSS.

I'll just point out some incorrect assumptions:
><h1>, <divinsert autom. spacing below them..

While <h1elements generally have some bottom margin set in browsers'
default style sheets, <divelements haven't.
><spanyou can't do margins or padding..

Oh yes you can. Vertical margins are ignored, though, unless you set the
display property to a value other than the default (inline).
ok, did this:
http://www.mayacove.com/design/test.html

did with div, set both margin-bottom and padding-bottom to 0.. but I
still see empty space beneath headline.. (<spantag ignored both
padding & margin settings..)

would appreciate suggestions...

thank you very much..

Nov 2 '07 #4
maya wrote:
ok, did this:
http://www.mayacove.com/design/test.html

did with div, set both margin-bottom and padding-bottom to 0.. but I
still see empty space beneath headline.. (<spantag ignored both
padding & margin settings..)

would appreciate suggestions...
Delete the <br at the end of
<div class="headlineHome">Article Headline ... viderer</div><br >
--
John
Pondering the value of the UIP: http://improve-usenet.org/
Nov 2 '07 #5
maya wrote:
>
http://www.mayacove.com/design/test.html

did with div, set both margin-bottom and padding-bottom to 0.. but I
still see empty space beneath headline

would appreciate suggestions...
Use better markup. That div is obviously a heading element, so use the
applicable <hx>. What follows that is obviously a paragraph of text, so
put it in <pmarkup and drop the bogus <br>.

h2 {margin-bottom:0} /* whatever heading level applies */
p {margin-top:0; margin-bottom:1em}

--
Berg
Nov 3 '07 #6

This discussion thread is closed

Replies have been disabled for this discussion.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.