Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7402087
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T04:39:08+00:00 2026-05-29T04:39:08+00:00

I hate to ask but I had to. I have an html code. For

  • 0

I hate to ask but I had to. I have an html code. For some reason the carriage return is being saved and is being shown in my browser.

<div class="module">
    <p>Some data 

    some data <strong> more data
    more data</strong> and even more data </p>
</div>

Obviously I expect this to show:

Some data some data more data more data and even more data.

Instead, the paragraph is keeping the carriage returns / line breaks.
I thought the problem was with Netbeans, so I downloaded Notepad++, but the problem persists. Thanks

I should add I am using this inside an .ctp file that belongs to CakePHP on a Windows machine, Apache WAMP server and that this data is explicit html, not echoed by php .

My current styling for the class is as follows:

.module{
     border: 1px solid   darkgrey;
     background-color: #F3F3F3;
     border-radius: 5px;
     padding:5px;
     margin-bottom: 1em;
     overflow:  auto;

}

I am also adding any applicable styling that might be affecting my code, maybe you guys can spot it.

body {

          margin: 0;
    padding: 0;
          font-family: 'Tahoma';
          letter-spacing: 1px;

}

p, ul, ol {
    margin-top: 0;
          line-height: 160%;

}

p{
          white-space: pre-wrap; /* css-3 */
          white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
          white-space: -pre-wrap; /* Opera 4-6 */
          white-space: -o-pre-wrap; /* Opera 7 */
          word-wrap: break-word; /* Internet Explorer 5.5+ */
}

the white space styling on the p tag I added it as a prevention to users that input long words without spaces as a form to break the page.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T04:39:09+00:00Added an answer on May 29, 2026 at 4:39 am

    You do have white-space:pre-wrap on your p!

    What did you think white-space:pre-wrap does? What were you trying to achieve?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I hate to have to ask, but I'm pretty stuck here. I need to
I hate ask stupid questions like this, but why doesn't my code do what
I hate to ask such a general question, but the following code is a
I hate to ask this here, but many people on stackoverflow have talked about
I hate to ask the same question others have asked in Stackoverflow, but I
I hate to introduce Unit-tests into a legacy code base, but I have to.
I hate giving out my code like this but I'm getting some errors about
I'd hate to ask an intentionally subjective question on here, but I don't have
I hate to ask this question on this forum, but I'm having a lot
I know you guys hate helping with homework, but I thought I might ask

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.