Skip to main content
Participating Frequently
February 25, 2025
Answered

Strange line-breaking behavior in hyperlinks, but only online and not in Dreamweaver

  • February 25, 2025
  • 3 replies
  • 528 views

I have a strange problem I can't figure out. In one section of my document, I have article titles to which I've added hyperlinks. I put quotation marks around the article titles, but the hyperlink doesn't include the quotation marks. When the article title extends past the end of the line, it wraps normally to the next line. So far so good. In the Dreamweaver display, everything works as you'd expect. (Screenshot below; see the first example.)

 

But when I view the page online through a browser (I tried this with both Firefox and Chrome), note how the first citation, because it extends beyond one line, puts a line break immediately after the first quotation mark and again immediately before the second one.

How do I get it to stop doing this?

Correct answer Nancy OShea

Run page validation and fix reported errors.

Window > Results > Validation... check document.

 

3 replies

BenPleysier
Community Expert
Community Expert
February 26, 2025

Try placing a non-breaking space ( ) to replace the space before the quotation mark, as in

   <p>•&nbsp;“<a href="https://ssrn.com/abstract=4952618">.....</p>

 Or better still, wrap the text inside an <em> element  and remove the quotes . This will render the text in italics and will be available for accessability like for screen readers.

   <p>•&nbsp;<a href="https://ssrn.com/abstract=4952618"><em>Law and the Political System in Xi Jinping's China<em></a>, in Daniel Lynch .... </p>

 

Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
Participating Frequently
February 26, 2025

Thanks to Nancy and Ben.. Nancy, your suggestion to run page validation and fix errors worked. I don't know how the particular errors would have produced the result they did, but in any case fixing them made the problem go away.

Ben, thanks for your suggestions, and I'll bear them in mind for future problems. In this case, I don't want to get rid of the quotation marks because the particular scholarly citation style I'm using requires them.

Thanks again to both for taking the time to help me out!

Nancy OShea
Community Expert
Nancy OSheaCommunity ExpertCorrect answer
Community Expert
February 26, 2025

Run page validation and fix reported errors.

Window > Results > Validation... check document.

 

Nancy O'Shea— Product User & Community Expert
Nancy OShea
Community Expert
Community Expert
February 26, 2025

Answers to such questions are contained in your code.

 

Example:

<ul>

<li><a href="some_link.html">EVERYTHING INSIDE THIS IS A HYPERLINK</a></li>

<ul>

 

 

For better answers, post the URL to your problem page online. 

 

 

Nancy O'Shea— Product User & Community Expert
Participating Frequently
February 26, 2025

Thanks. The problem page is donaldclarke.net. But that's not going to help if the problem is in the css document, right? I'm also confused because I thought that Dreamweaver is supposed to show what your page will look like on line, but it's showing something different, as the screenshots demonstrate.

Nancy OShea
Community Expert
Community Expert
February 26, 2025

Which browser are you using? 

 

I am seeing several code errors and warnings.  Fix these problems to ensure accurate cross-browser rendering.

https://validator.w3.org/nu/?doc=https%3A%2F%2Fdonaldclarke.net%2F

 

Also, you have a leading space on code line 28. 

 

See this chapter on unordered (bulleted) lists:

https://www.w3schools.com/html/html_lists_unordered.asp

 

DW is not a browser.  It's web authoring software.  LIVE view is merely an estimate of what your page looks like in some browsers. It's always best to test in actual web devices (Chrome, Firefox, Edge, iOS and Androids) as they do vary quite a bit.

 

Nancy O'Shea— Product User & Community Expert