Discussion:
emulating <br> tag with css
(too old to reply)
paulohnine
2004-08-27 18:36:31 UTC
Permalink
Hey,
How would I go about emulating the <br> tag using css - to control the height of the line break. I dont want to redifine the <br> tag, I want to emulate it using a class.

-Paul
darrel
2004-08-27 18:58:41 UTC
Permalink
Post by paulohnine
How would I go about emulating the <br> tag using css - to control the
height of the line break. I dont want to redifine the <br> tag, I want to
emulate it using a class.

A line break is a line break. I think what you are asking for is perhaps a
block-level wrapper like a DIV, P or a SPAN set to display: block. This will
put a visual line break at the end of the container.

-Darrel
Chris In Madison
2004-08-27 19:54:43 UTC
Permalink
You can create a class with a zero top and bottom margin and apply it to the
block-level tag you'd like to squish together. Only problem is it will
affect those object above and below it, so you may end up creating two
styles, one to apply to the top one that doesn't have a zero top margin, and
one to the bottom that doesn't have a zero bottom margin. There are
probably some other creative options as well, but it all comes down to
zeroing the margin(s) of an element.

Best regards,
Chris
P@tty Ayers
2004-08-27 20:55:51 UTC
Permalink
Post by paulohnine
How would I go about emulating the <br> tag using css - to control the
height of the line break. I dont want to redifine the <br> tag, I want to
emulate it using a class.
Why? Why not redefine the <br>?
--
Patty Ayers | www.WebDevBiz.com
Free Articles on the Business of Web Development
Web Design Contract, Estimate Request Form, Estimate Worksheet
--
trx
2004-08-28 05:06:09 UTC
Permalink
Post by ***@tty Ayers
Why? Why not redefine the <br>?
I've never had much luck styling <br>. It's a pretty stubborn little tag.
You can set it to "display: none" {though that doesn't seem particularly
useful}, you can style it as a clear, and in Gecko browsers only you can
give it a top and bottom margin--but beyond those limited things, I've
never been able to do much of anything with it. I'd love to hear from
anyone who has found some other tricks for it.
--
trx
Murray *TMM*
2004-08-28 19:09:52 UTC
Permalink
Why use a class at all? Just create a descendent selector in CSS that
specifically targets the element you are wanting to space, and add some
bottom margin/padding?
--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================
Post by paulohnine
Hey,
How would I go about emulating the <br> tag using css - to control the
height of the line break. I dont want to redifine the <br> tag, I want to
emulate it using a class.
-Paul
gajett
2004-08-30 04:11:17 UTC
Permalink
Post by paulohnine
Hey,
How would I go about emulating the <br> tag using css - to control the
height of the line break. I dont want to redifine the <br> tag, I want to
emulate it using a class.
Post by paulohnine
-Paul
How about a new <p class="big(orSmall)LineHeight")> with some definition of
line height to get what you are after?

Greg

Loading...