473,378 Members | 1,420 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,378 software developers and data experts.

The second br tag within td class is ignored

This is really weird, and is a problem only on IE 6 for me, but not
Firefox.

Here is the code:

<td colspan=3 class=allmessagesheader>Pictures from
Europe<br><br><br>December 10, 2000</td>

Looks pretty basic, right? Well, the second <br> tag in there is
ignored. If I have only one <br> tag, it behaves as usual. The second
<br> tag does nothing, and if I add the third <br> tag, it behaves like
there are two, skipping a line of blank space (which is what I want).
Really weird. If I remove the class call, it works fine, and if I use
a different class, it works fine. So, must be the class. What does
the class have to say?

td.allmessagesheader {
color: #ffffff;
background-color: #003366;
font: 100% verdana, arial, sans-serif;
font-size: 16px;
line-height: 18px;
letter-spacing: 0.2em;
text-align: center;
}
So what in this code is causing <br> tags to not do their stuff?

I'm having the same exact problem with this code and class:

<table width=500><tr><td class=commententry>
<font class=ajstyle>
This is a list of all the posted messages for all pictures in all
galleries.
To jump to a particular photo, just click on it.
</font><br><br><br><font class=ajstyle>
Note that only photos with live comments are shown on this page.
</font>
</td></tr></table>

I have to escape the font class "ajstyle" before the <br> tags in order
for them *all* to be interpreted. The ajstyle class is:

font.ajstyle {
font: 90% verdana, arial, sans-serif;
letter-spacing: 0.2em;
color: #BEF5F3;
}

This is really weird.

I wish the world used Firefox.

Help appreciated.
Jaxon

Jul 21 '05 #1
9 4855
Jaxon Bridge wrote:
This is really weird, and is a problem only on IE 6 for me, but not
Firefox.

Here is the code:

<td colspan=3 class=allmessagesheader>Pictures from
Europe<br><br><br>December 10, 2000</td>


Use <br>&nbsp;<br>&nbsp;<br>December 10, 2000
Jul 21 '05 #2
C A Upsdell > wrote:
Jaxon Bridge wrote:
<td colspan=3 class=allmessagesheader>Pictures from
Europe<br><br><br>December 10, 2000</td>

Use <br>&nbsp;<br>&nbsp;<br>December 10, 2000


The OP asked in a stylesheets news group. Why not tell him about margin
or padding?
--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)
Jul 21 '05 #3
Johannes Koch wrote:
C A Upsdell > wrote:
Jaxon Bridge wrote:
<td colspan=3 class=allmessagesheader>Pictures from
Europe<br><br><br>December 10, 2000</td>


Use <br>&nbsp;<br>&nbsp;<br>December 10, 2000

The OP asked in a stylesheets news group. Why not tell him about margin
or padding?


The OP's specific problem is not a CSS problem.
Jul 21 '05 #4
On Tue, 19 Jul 2005, C A Upsdell and MISSINGcupsdellXXX"TERMINATOR wrote:
Johannes Koch wrote:
C A Upsdell > wrote:
Use <br>&nbsp;<br>&nbsp;<br>December 10, 2000

The OP asked in a stylesheets news group. Why not tell him about margin or
padding?


The OP's specific problem is not a CSS problem.


So recommend solving it by taking away the original problem. If
there's still a genuine issue, apply a genuine solution, which the
original clutter was not. (Hint: there is no defined correct
behaviour for multiple <br> tags). (Hint: presentation detail belongs
in the stylesheet).

Heaping yet more clutter onto clutter that shouldn't have been there
in the first place is no solution (as well as being off-topic for the
stylesheets group, as was already remarked).
Jul 21 '05 #5
This worked, thanks, although I am curious why it was necessary to add
the non-binding space when working with classes, whereas outside of
classes the multiple <br> tags have always worked fine for me by
themselves.

You are right (the other poster) that I could probably solve the issue
using margin and padding options instead; I am new to CSS so old habits
die hard.

J

Jul 21 '05 #6
Alan J. Flavell wrote:
On Tue, 19 Jul 2005, C A Upsdell and MISSINGcupsdellXXX"TERMINATOR wrote:
Johannes Koch wrote:
C A Upsdell > wrote:

Use <br>&nbsp;<br>&nbsp;<br>December 10, 2000

The OP asked in a stylesheets news group. Why not tell him about margin or
padding?


The OP's specific problem is not a CSS problem.


So recommend solving it by taking away the original problem. If
there's still a genuine issue, apply a genuine solution, which the
original clutter was not. (Hint: there is no defined correct
behaviour for multiple <br> tags). (Hint: presentation detail belongs
in the stylesheet).

Heaping yet more clutter onto clutter that shouldn't have been there
in the first place is no solution (as well as being off-topic for the
stylesheets group, as was already remarked).


Sigh. I really did not want to get into this issue. Yes, I could have
provided a CSS solution, but there are cases when the <br> solution is
better, e.g. cases in which the XHTML 2.0 <l> tag would be appropriate,
and in any case it seemed to me that the OP was primarily concerned with
why their <br> solution was failing.

And yes, this is a CSS newsgroup, but if it is appropriate to suggest a
CSS solution in an HTML newsgroup (which happens all the time), then
surely it is _sometimes_ appropriate to suggest a relevant HTML solution
in a CSS newsgroup.

Jul 21 '05 #7
C A Upsdell > wrote:
Jaxon Bridge wrote:

<td colspan=3 class=allmessagesheader>Pictures from
Europe<br><br><br>December 10, 2000</td>


Use <br>&nbsp;<br>&nbsp;<br>December 10, 2000


Seems to me a better solution would be to use semantic markup, like:

<h2>Pictures from Europe</h2>

and style h2 (or whatever) with desireable margin/padding values. Much
better than the kludgy <br> and non-breaking spaces, IMO.

--
Reply email address is a bottomless spam bucket.
Please reply to the group so everyone can share.
Jul 21 '05 #8

On Tue, 19 Jul 2005, C A Upsdell wrote:
Sigh. I really did not want to get into this issue.
Welcome to usenet...
Yes, I could have provided a CSS solution, but there are cases when the
<br> solution is better, e.g. cases in which the XHTML 2.0 <l> tag would
be appropriate,
I don't understand why you dragged in that extraneous detail. Kindly
review the subject header again. The topic is not a single <br> tag, but
multiple. I say again, there is no defined correct behaviour for multiple
<br> tags. "the second br tag...is ignored" is a perfectly valid
interpretation, and several browsers have taken this approach: once the
line has been broken, it's broken, and that's that.
and in any case it seemed to me that the OP was primarily concerned with
why their <br> solution was failing.
Correction: "multiple <br>".

But it's not "failing", since there's no defined correct behaviour.
And yes, this is a CSS newsgroup, but if it is appropriate to suggest a
CSS solution in an HTML newsgroup (which happens all the time), then
surely it is _sometimes_ appropriate to suggest a relevant HTML solution
in a CSS newsgroup.


Presentation is a stylesheet issue. If you can produce some reason that
the semantic structure of your content in HTML would need multiple <br>
tags, then I'd be quite surprised. I see no indication of it here, at any
rate. Even less after you've added your clutter to it.

have fun

Jul 21 '05 #9
Alan J. Flavell wrote:
Yes, I could have provided a CSS solution, but there are cases when the
<br> solution is better, e.g. cases in which the XHTML 2.0 <l> tag would
be appropriate,
I don't understand why you dragged in that extraneous detail. Kindly
review the subject header again. The topic is not a single <br> tag, but
multiple. I say again, there is no defined correct behaviour for multiple
<br> tags.


Sigh. There is no defined behaviour, but there is the behaviour that
the OP wanted, and my solution reliably gives them what they wanted.
Presentation is a stylesheet issue. If you can produce some reason that
the semantic structure of your content in HTML would need multiple <br>
tags, then I'd be quite surprised.


Whether there is some reason should be an issue for the OP, not for me,
and I am not going to second-guess the OP.
Jul 21 '05 #10

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

Similar topics

7
by: Harry Pehkonen | last post by:
I have been defining new class methods when I'm trying to simplify some code. But I'm thinking I should just define functions within that method because they aren't useful from the outside anyway....
6
by: Steve Jorgensen | last post by:
I tried to fix a problem for a client today in which report sections and even individual text controls in some of their reports are being split across page boundaries. Of course, I was thinking...
7
by: Sky | last post by:
What I have currently: I have a user control called mod_container.aspx that is basically two divs -- the top a toolbar, that expands/collapse the second div which can contain other...
3
by: DotNetNewbie | last post by:
I am reading the book Teach Yourself Microsoft Visual Basic .Net 2003 in 21 Days. I am having trouble getting one of the exercises to work at the end of day 4. Exercises: 1. Create a new...
6
by: Ronald S. Cook | last post by:
How do I launch, say, Microsoft Word from within a C# Win app? Word should launch exterior to my app, of course. Is it easy to set size and position of where Word window will be placed? ...
1
by: vbnetguy | last post by:
After adding a couple of atlas controls to my page the validators do not seem to work. The first click fires the validator controls correctly, however on the second click - without touching a...
3
by: Kaz Kylheku | last post by:
I have a structure of three boxes contained within a box, like this: <div class="line"> <div class="box" id="one">one</div> <div class="box" id="two">two</div> <div class=box"...
10
by: Kaz Kylheku | last post by:
I have a structure of three boxes contained within a box, like this: <div class="line"> <div class="box" id="one">one</div> <div class="box" id="two">two</div> <div class=box"...
4
by: zion4ever | last post by:
Hello good people, Please bear with me as this is my first post and I am relative new to ASP. I do have VB6 experience. I have a form which enables users within our company to do an intranet...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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?

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.