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 7817753
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T06:20:37+00:00 2026-06-02T06:20:37+00:00

By line break I do not mean the <br /> tag. Rather what I

  • 0

By “line break” I do not mean the <br /> tag. Rather what I mean is the actual line break itself in the HTML like below:

<html>
    <body> <--This is on a new line

I have a set of div’s that are display:inline-block and depending on whether or not the following <div> is on a new line or the same line it displays slightly differently. Generating these div’s in PHP requires that these are on new lines. The catch is that I need to generate these same div’s in jQuery by using a $(this).clone().appendTo(element) and I don’t know how to add the line break using jQuery.

So is there some kind of trick that will append these div’s on new lines or some kind of css property that would display it the same either way?

This is what my html looks like using PHP:

<div>
    <label>Input label</label>
    <input type="text" />
</div>
<div>
    <label>Input label</label>
    <input type="text" />
</div>

This is what it’s like using jQuery:

<div>
    <label>Input label</label>
    <input type="text" />
</div><div>
    <label>Input label</label>
    <input type="text" />
</div>
  • 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-06-02T06:20:39+00:00Added an answer on June 2, 2026 at 6:20 am

    In the string you are using for your html, use a \n.

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

Sidebar

Related Questions

I previously asked why \n in a string was not returning a line break.
Is there a way to have \n make a line break in a TextBlock
I have a <div> that I want to be on a line by itself.
I would like to count how many automatic line breaks (not returns the user
I have some JSON I am parsing that looks like this: { dhkplhfnhceodhffomolpfigojocbpcb: {
This should be waaaay easier... I want to add a coded line break to
I have a UILabel whose size is calculated with sizeWithFont: method. The line break
I have an inline element with a line break in it. It has padding
Just curios if there's a way to have a rewrite for /static/index-discover.html look like
I have a very basic question : how to do a line break with

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.