These forums are currently read-only due to receiving more spam than actual discussion. Sorry.

It is currently Sat Dec 02, 2017 4:13 pm Advanced search

Two <br><br> tags but one line break issue.

If you are stuck or have questions regarding HTML or other Web technologies, ask your questions here. No question too dumb!

Two <br><br> tags but one line break issue.

Postby MirekS » Tue Jun 04, 2013 8:27 pm

<html>
<body contenteditable="true">
<span style="background-color: #00FFF;">Click Here</span>
<br>
<br>
</body>
</html>


1. Click on "Click Here" press DOWN once
2. Press DOWN second time

Why caret stays in second line when there is two <br>??
MirekS
<h6>
 
Posts: 2
Joined: Tue Jun 04, 2013 8:16 pm

Re: Two <br><br> tags but one line break issue.

Postby JAB Creations » Tue Jun 04, 2013 9:48 pm

1.) That code is going to be parsed in quirks mode, add a doctype and retry.

2.) If it's still broken what browser/version are you using?
User avatar
JAB Creations
<aside>
 
Posts: 566
Joined: Tue Mar 13, 2007 4:48 am
Location: Sarasota Florida, USA

Re: Two <br><br> tags but one line break issue.

Postby MirekS » Wed Jun 05, 2013 6:50 am

Doesn't work for any <!DOCTYPE> from http://www.w3schools.com/tags/tag_doctype.asp
Browsers:
Firefox 20.0 Mozilla Firefox for Ubuntu canonical - 1.0,
Firefox 21.0 - Win7
Chrome ver. 27.0.1453.94 m
IE 10 ver. 10.0.9200.16576
MirekS
<h6>
 
Posts: 2
Joined: Tue Jun 04, 2013 8:16 pm

Re: Two <br><br> tags but one line break issue.

Postby JAB Creations » Thu Jun 06, 2013 5:04 am

It would also help if you posted all the relevant HTML code for the page for us to help you.
User avatar
JAB Creations
<aside>
 
Posts: 566
Joined: Tue Mar 13, 2007 4:48 am
Location: Sarasota Florida, USA

Re: Two <br><br> tags but one line break issue.

Postby zcorpan » Wed Jun 12, 2013 12:18 pm

This is how it's supposed to work. The last line is empty so doesn't get rendered by CSS rules.

Notice that these two render the same:

http://software.hixie.ch/utilities/js/l ... saved/2304
http://software.hixie.ch/utilities/js/l ... saved/2305
zcorpan
<article>
 
Posts: 807
Joined: Tue Feb 06, 2007 8:29 pm
Location: Sweden


Return to Help & Advice

Who is online

Users browsing this forum: No registered users and 0 guests