473,606 Members | 2,877 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 9218
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.e asynews.com>, gr****@reenie.o rg
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;fon t-weight:bold; font-size:.75em;
border-color:#C80080;f loat:left;margi n-left:1px;
border-width:1px;paddi ng: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
7856
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 "languages" files and these are describes for things on my website. Example text looks like this:
2
1944
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
2737
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 tags will remain making the page safe (I have to convert the linefeeds to <BR>s because the Server.EncodeHTML does not do that it seems). The problem is that users can use a special tag when editing the top to specify an area of the tip that will...
2
2526
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 the charcontrols option and chr(13) with success.. was using the following code: Dim s As String = MyTextbox.Text
1
3166
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 the charcontrols option and chr(13) with success.. was using the following code: Dim s As String = MyTextbox.Text
9
43130
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 have also attempted singular variations of the CR/LF combination and even reversed the sequence without success. Is it possible that it may be encoded differently and if so what is it? Thanks
4
4332
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 application crashes with the same error message I would get when writing <brand no closing tag. To make everything a little stranger, even <br></brseems to be bad while <lbr/is fine. Ive tried some other tag names and the problem only appears with...
2
19569
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> </form> <span id="txtValue"></span> <script language='javascript'>
7
3607
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 most people use when they write static code (some people use <br>, but with xhtml you are required to close all tags), IE6 simply breaks to the next line like it is supposed to. However, with <br></br>, which is what is sometimes generated by...
0
8456
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
6792
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5971
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5467
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3945
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3989
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2452
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1565
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1309
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.