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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:42:45+00:00 2026-05-25T19:42:45+00:00

Not really a problem, but I have noticed a behavior in the layout of

  • 0

Not really a problem, but I have noticed a behavior in the layout of submit buttons that I find surprising. Here are the 2 test cases.

Number 1 :

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html>
<head>
</head>
<body>

<form method="post" action="move.php" style="text-align: center;">
<input type="submit" value="Left" name="left"/>
<input type="submit" value="Right" name="right"/>
</form>

</body>
</html>

Number 2 :

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html>
<head>
</head>
<body>

<form method="post" action="move.php" style="text-align: center;">
<input type="submit" value="Left" name="left"/><input type="submit" value="Right" name="Right"/>
</form>

</body>
</html>

If we check these both cases on web browsers, there is a difference in the spacing between the two buttons, simply because I went to next line in the code. I do not understand, is it normal ?

If it is normal, how could I do to render like the second case while formatting my code like the first case ?

  • 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-25T19:42:46+00:00Added an answer on May 25, 2026 at 7:42 pm

    line break is rendered as a space in HTML
    you can alter the rendering using css. an example would be to put a style=”float: left;” on both, or wrap them in another span or some other html element.

    <span style="float: left;"><input type="submit" value="Left" name="left" /></span>
    <span style="float: left;"><input type="submit" value="Right" name="Right" /></span>
    

    or

    <input type="submit" value="Left" name="left" style="float: left;" />
    <input type="submit" value="Right" name="Right" style="float: left;" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm not really sure if there is a single problem here or I have
This is not really a question because I just solved the problem, but I
I have had the following problem for a while and I am really not
I have a little problem about using jQuery (I really do not know jQuery
Not really a programming question, but relevant to many programmers... Let's say I have
I have some really weird crash here, ive got it before, but i thought
This is not really a programming question, more of an algorithmic one. The problem:
I have a TSQL script that does a lot of database structure adjustments but
I have a problem as follows: We're using a rich text editor (TinyMCE, but
In my Swing application I have the problem that when creating a new instance

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.