0

Good day! I just start working with php html and i have a question on how can i put whitespaces between the Registraion Form and Edit Registration Form. Any help would be very much appreciated. Thank you!

<div style="padding-left:380px;">
<a href="add.php"> Registration Form </a>
<a href="edit.php"> Edit Registration Form </a>
</div>

Output must be:

           Registration Form           Edit Registration Form
Lawrence Cherone
  • 46,049
  • 7
  • 62
  • 106
Yumi
  • 151
  • 1
  • 10
  • 2
    The best way would be to add CSS styling to the div, e.g.: `div > a {margin-left: 30px}`. Better to add a specyfic name to div class like ` – Egel May 30 '21 at 20:15
  • sounds duplicate of https://stackoverflow.com/questions/36656/how-do-i-keep-whitespace-formatting-using-php-html – Drdilyor May 30 '21 at 23:08

4 Answers4

1
<div style="padding-left:380px;">
    <a style="margin-right:50px" href="add.php"> Registration Form </a>
    <a style="margin-left:50px" href="edit.php"> Edit Registration Form </a>
</div>
Raul
  • 963
  • 2
  • 11
  • 31
  • Show him the comparison, how to separate the css, `div > a { ... }`, to use cascading. – NVRM May 30 '21 at 23:24
0

Try this: put &nbsp(no space); inside ''.

str_repeat('&nbsp;', 10); // adds 10 white spaces
Skoua
  • 3,373
  • 3
  • 38
  • 51
0

There is many ways to achieve this but here's one. This should be done using CSS, not point in using actual spaces here:

HTML

<div class="container">
  <a href="add.php">Registration Form</a>
  <a href="edit.php">Edit Registration Form</a>
</div>

CSS

.container {
  padding-left: 380px;
}

.container a {
  margin: 0 100px;
}
Skoua
  • 3,373
  • 3
  • 38
  • 51
0
<pre><href="add.php">Registration Form        </a></pre>
Yumi
  • 151
  • 1
  • 10