473,396 Members | 2,154 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,396 software developers and data experts.

browser ignore <br>

red
If I have <span>text</span> <br> and then some text

isn't there sopposed to be a line break between the span and the text ?
Why do browsers ignore the <br> ?
Jul 20 '05 #1
9 9188
Els
red wrote:
If I have <span>text</span> <br> and then some text

isn't there sopposed to be a line break between the span
and the text ? Why do browsers ignore the <br> ?


They don't usually, which doctype declaration are you using?

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Now playing: S a a r - 9
Jul 20 '05 #2
Els wrote:
red wrote:
If I have <span>text</span> <br> and then some text

isn't there sopposed to be a line break between the span
and the text ? Why do browsers ignore the <br> ?


They don't usually, which doctype declaration are you using?


If it's xhtml 1.0strict, you need a closing tag, like this <br />

--
Lennart Fylling
Standards compliant and accessible web solutions.
Aalesund
Norway
Jul 20 '05 #3
On Thu, 16 Sep 2004 16:10:07 GMT, red <gr****@reenie.org> wrote:
If I have <span>text</span> <br> and then some text

isn't there sopposed to be a line break between the span and the text ?
In HTML, yes.
Why do browsers ignore the <br> ?


Are you using HTML or XHTML? In XHTML the tag must include a slash, use
<br /> instead.

Jul 20 '05 #4
red
Lennart Fylling wrote:
Els wrote:
red wrote:

If I have <span>text</span> <br> and then some text

isn't there sopposed to be a line break between the span
and the text ? Why do browsers ignore the <br> ?


They don't usually, which doctype declaration are you using?

If it's xhtml 1.0strict, you need a closing tag, like this <br />

--
Lennart Fylling
Standards compliant and accessible web solutions.
Aalesund
Norway

I'm using:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

I tried using <br /> but it doesn't seem to make any difference.

Actually, there is somewhat of a line break- it just doesn't really go
to a new line. Here's the page I'm working on:
http://rainbowfamily.info/bookmarks

Near the bottom is "red's links" enclosed in a span with a red border

After that is "new menu name" which is supossed to be on a new line.
There's 2 <br />s which do have some effect- notice the "new menu name"
is lower, but its not to the left lile anew line should be. How do I get
"new menu name" to be on a new line ? I tried putting it all in divs but
that didn't make any difference. The divs refused to go onto new lines.

red
Jul 20 '05 #5
On Thu, 16 Sep 2004 17:08:06 GMT, red <gr****@reenie.org> wrote:
I'm using:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
Excellent.
I tried using <br /> but it doesn't seem to make any difference.
Don't use that, it's HTML, use <br>
Actually, there is somewhat of a line break- it just doesn't really go
to a new line. Here's the page I'm working on:
http://rainbowfamily.info/bookmarks

Near the bottom is "red's links" enclosed in a span with a red border
.... which is floated. Neglected to notice that?
After that is "new menu name" which is supossed to be on a new line.
There's 2 <br />s which do have some effect- notice the "new menu name"
is lower, but its not to the left lile anew line should be. How do I get
"new menu name" to be on a new line ? I tried putting it all in divs but
that didn't make any difference. The divs refused to go onto new lines.


Right. Floats move the content to the left, and the following content
starts at the float's vertical height. But the content cannot overlap the
float, so your content after the float cannot reach the left margin.

Frankly, don't see why the box is floated at all. I'd just remove the
float style. Or, if there's a reason it's floated that I can't see, style
the content you want under the float for sure with clear: left; - but the
first solution is probably what you want.

This is weird HTML, by the way.

You use one h4 but no h1, h2 or h3. And this h4 isn't even a heading.

Things that ARE headings are styled.

You have used almost only inline elements, very few block. All of your
br's would be unnecessary if you used divs. Or better yet, markup
paragraphs between p tags and don't force line breaks.


Jul 20 '05 #6
saz
In article <VL********************@news.easynews.com>, gr****@reenie.org
says...
Lennart Fylling wrote:
Els wrote:
red wrote:
If I have <span>text</span> <br> and then some text

isn't there sopposed to be a line break between the span
and the text ? Why do browsers ignore the <br> ?

They don't usually, which doctype declaration are you using?

If it's xhtml 1.0strict, you need a closing tag, like this <br />

--
Lennart Fylling
Standards compliant and accessible web solutions.
Aalesund
Norway

I'm using:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

I tried using <br /> but it doesn't seem to make any difference.

Actually, there is somewhat of a line break- it just doesn't really go
to a new line. Here's the page I'm working on:
http://rainbowfamily.info/bookmarks

Near the bottom is "red's links" enclosed in a span with a red border

After that is "new menu name" which is supossed to be on a new line.
There's 2 <br />s which do have some effect- notice the "new menu name"
is lower, but its not to the left lile anew line should be. How do I get
"new menu name" to be on a new line ? I tried putting it all in divs but
that didn't make any difference. The divs refused to go onto new lines.

red

This is your part of your css:

..filenames{ border-style:solid;font-weight:bold; font-size:.75em;
border-color:#C80080;float:left;margin-left:1px;
border-width:1px;padding:2px; width:20%; margin-top:1px;text-
align:center}

First, fix your entire stylesheet. Part of the problem lies there.

Second, remove the float:left; from .filenames
Jul 20 '05 #7
On Thu, 16 Sep 2004 17:08:06 GMT, red wrote:
Actually, there is somewhat of a line break- it just doesn't really go
to a new line.
It really does go to a new line, but
you are going about this all wrong.
..Here's the page I'm working on:
http://rainbowfamily.info/bookmarks


You need to wrap those pieces of text in
some logical HTML construct such as a <p>
tag and apply a padding-bottom to get the
spacing you want.

Put such things as '<br><br> ' and browsers
are free to concatenate the two into a single
line break, because that is what the <br>
element is, as opposed to a vertical 'spacer',
which is how you are attempting to use it.

HTH

--
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.lensescapes.com/ Images that escape the mundane
Jul 20 '05 #8
red
Neal wrote:


Right. Floats move the content to the left, and the following content
starts at the float's vertical height. But the content cannot overlap
the float, so your content after the float cannot reach the left margin.

Frankly, don't see why the box is floated at all. I'd just remove the
float style. Or, if there's a reason it's floated that I can't see,
style the content you want under the float for sure with clear: left; -
but the first solution is probably what you want.

Thanks that seems to have fixed it.
The red bordered filename was originally divs- thus the float:left to
get my list of filenames to go one after the other. But I'll just leave
them as spans and remove the float.
I have to go to the dump and I'll fix it up and upload it when I get back.
Jul 20 '05 #9
red <gr****@reenie.org> wrote:
If I have <span>text</span> <br> and then some text

isn't there sopposed to be a line break between the span and the text ?
Why do browsers ignore the <br> ?


What browsers? What page? The psychics in this group are on vacation.
I just tried it once and it works fine.

--
Harlan Messinger
Remove the first dot from my e-mail address.
Veuillez ôter le premier point de mon adresse de courriel.
Jul 20 '05 #10

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

Similar topics

4
by: fis | last post by:
Hi all, I've problem because there are needed break lines in my texts on the web site but i can't do it :( My pipeline looks like: XMS -> I18N -> XSLT -> HTML I have lot of texts in my...
2
by: John D | last post by:
can anyone explain why a site would use this in their page <!--<BR>--> Presumably it is hiding the <BR> from ... ??? TIA John
7
by: Rocky Moore | last post by:
I have a web site called HintsAndTips.com. On this site people post tips using a very simply webform with a multi line TextBox for inputing the tip text. This text is encode to HTML so that no...
2
by: Winshent | last post by:
I have a multi line text in an admin page on my cms. I am trying to capture carriage returns as and replace them with <p></p> bfore the string gets written to the database. I have tried all...
1
by: Winshent | last post by:
I have a multi line text in an admin page on my cms. I am trying to capture carriage returns as and replace them with <p></p> bfore the string gets written to the database. I have tried all...
9
by: Wayne | last post by:
$a = $_POST; # txt_content = This is a<CR><LF>Test $p = str_replace ("%0D%0A", "<br>", $a); That is the above code that I am using, however, it is not picking up the CR/LF from the textarea. I...
4
by: Christofer Dutz | last post by:
Hi, I am having a small problem, that is driving me nuts. My application reads some Xml and runs 2 Xsl Transformations to generate HTML. As soon as my second XSL introduces some <br/tags, the...
2
by: xhe | last post by:
I met a very headache problem in javascript, I think this might be difference between IE and NS / Safari. I have a text area <form> <textarea name='tex1' onkeyup='displayit();'></textarea>...
7
by: Nathan Sokalski | last post by:
Something that I recently noticed in IE6 (I don't know whether it is true for other browsers or versions of IE) is that it renders <br/and <br></br> differently. With the <br/version, which is what...
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: 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: 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
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.