473,387 Members | 1,431 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

styling a <br class="spacer" />

I'm trying to style a line break, something like this:

<br class="spacer" />

via CSS, but none of the following seems to have any effect. Any ideas?

br.spacer {
clear: both;
height: 50px;
margin-bottom: 20px;
padding-bottom: 20px;
min-height: 20px;
white-space: normal;
clip: auto;
margin-top: 20px;
padding-bottom: 20px;
vertical-align: 20px;
}

(I'm trying to put a little vertical space in between some images. Since
the images are displayed inline [as opposed to block], I had to put a <br />
in between them to have them display vertically. By doing so, of course,
they're sitting right on top of each other. I don't want to use any <img />
padding or margins because that would affect other images elsewhere - and I
don't want to create another class of images just for this. I think a
simple break in between images should suffice, with the appropriate styling,
of course.)

-- Richard
Jul 20 '05 #1
5 31400
In article <be**********@nnrp.atgi.net> in
comp.infosystems.www.authoring.stylesheets, Richard Barnet
<rb*****@csaNOSPAMreno.org> wrote:
I'm trying to style a line break, something like this:

<br class="spacer" />

via CSS, but none of the following seems to have any effect. Any ideas?

<br> is not a block-level element.
(I'm trying to put a little vertical space in between some images.


Why introduce extra HTML elements? Isn't it easier and more direct
to style the images themselves (either via class or ID) with the
desired padding or margins?

--
Stan Brown, Oak Road Systems, Cortland County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2 spec: http://www.w3.org/TR/REC-CSS2/
validator: http://jigsaw.w3.org/css-validator/
Jul 20 '05 #2
Stan Brown wrote on 04 jul 2003 in
comp.infosystems.www.authoring.stylesheets:
In article <be**********@nnrp.atgi.net> in
comp.infosystems.www.authoring.stylesheets, Richard Barnet
<rb*****@csaNOSPAMreno.org> wrote:
I'm trying to style a line break, something like this:

<br class="spacer" />

via CSS, but none of the following seems to have any effect. Any ideas?


<br> is not a block-level element.
(I'm trying to put a little vertical space in between some images.


Why introduce extra HTML elements? Isn't it easier and more direct
to style the images themselves (either via class or ID) with the
desired padding or margins?


or use

<p class="spacer" />

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 20 '05 #3
In article <be**********@nnrp.atgi.net>, rb*****@csaNOSPAMreno.org
says...
I'm trying to style a line break, something like this:

<br class="spacer" />
.... (I'm trying to put a little vertical space in between some images. Since
the images are displayed inline [as opposed to block], I had to put a <br />
in between them to have them display vertically. By doing so, of course,
they're sitting right on top of each other. I don't want to use any <img />
padding or margins because that would affect other images elsewhere - and I
don't want to create another class of images just for this. I think a

....
The images are wrapped in something surely? A div maybe? So use:

div#thing img { display: block; margin: 5px 0; }
Jul 20 '05 #4
*Richard Barnet* <rb*****@csaNOSPAMreno.org>:

I'm trying to style a line break, something like this:

<br class="spacer" />


How do you expect an element to be styled that (AFAIK) doesn't generate a
CSS box?

--
The Hitchhiker's Guide to the Galaxy:
"The Universe, as has been observed before, is an unsettlingly big place,
a fact which for the sake of a quiet life most people tend to ignore."
Jul 20 '05 #5
Tim
On Thu, 3 Jul 2003 16:32:25 -0700,
"Richard Barnet" <rb*****@csaNOSPAMreno.org> wrote:
(I'm trying to put a little vertical space in between some images. Since
the images are displayed inline [as opposed to block], I had to put a <br />
in between them to have them display vertically. By doing so, of course,
they're sitting right on top of each other. I don't want to use any <img />
padding or margins because that would affect other images elsewhere - and I
don't want to create another class of images just for this. I think a
simple break in between images should suffice, with the appropriate styling,
of course.)


If you're prepared to make a special class of br between those images,
why not make a special img class, just for those images? (Leaving most
other images to display as normal.) After all, it really is the
presentation of those images which you're playing with; and I really
can't see how it's more work to produce a special class for those image
elements, than the br element (or something else).

Alternatively, you could make a special div class around those images,
and apply your styles to images that are children of your special div
class. But you're still going to create a special class of something,
whatever method you choose, just for those images.

You're avoiding using CSS to do the job properly (directly affect the
thing you want to modify), and playing the tag soup game (messing with
other things, to try and achieve the desired result - br is a "line
break").

--
My "from" address is totally fake. The reply-to address is real, but
may be only temporary. Reply to usenet postings in the same place as
you read the message you're replying to.
Jul 20 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.