How to place buttons in the same line, center, and not too close to each other?

user4287698

I have 2 buttons :

  • Download
  • Edit

I want to place both of them in same line, side by side, but not too far away from each other either.

As of right now this what I have

enter image description here

I try to give them class pull-left and pull-right This what they come out to be

enter image description here

They're too far away. :(

I want them to look something like this. Possible, with the vertical line in the middle. I am not sure how to do that.

enter image description here

Here is my HTML Code

<p>
    <span>
        <a class="btn-1" href="/marketing_materials/{{$marketing_material->id}}/download/media_path">
            Download
        </a>
    </span>
</p>
<p>
    <span>
        <a class="btn-2" href="{{ URL::to('marketing_materials/'.$marketing_material->id.'/edit') }}">
            Edit
        </a>
    </span>
</p>

What should I do to get close to what I want ?

iori
  • You had 2 <p> tags, combine them into 1.
  • Place them in the same <p> tag so that they will be in same line as you wanted.
  • Add style="text-align:center;" into your <p> tag.
  • Add a bunch of &nbsp; between them to maintain the spaces
  • For your vertical pipeline, just do this &nbsp;|&nbsp;

Try this

<p style="text-align:center;">
    <span>
        <a class="btn-1 pull" href="/marketing_materials/{{$marketing_material->id}}/download/media_path">
            Download
        </a>
    </span>
    &nbsp;&nbsp;&nbsp;
    <span>
        <a class="btn-2" href="{{ URL::to('marketing_materials/'.$marketing_material->id.'/edit') }}">
            Edit
        </a>
    </span>
</p>

이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.

침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제

에서 수정
0

몇 마디 만하겠습니다

0리뷰
로그인참여 후 검토

관련 기사

분류에서Dev

Labels on the same line, not under each other

분류에서Dev

How to place list items that are overlapping next to each other?

분류에서Dev

How to place 3 boxes nex to each other with some text inside it?

분류에서Dev

How to place 2 spans beside each other with full width with CSS

분류에서Dev

Pandas - bucketing events close to each other

분류에서Dev

How to auto align the buttons to fit in center of the screen

분류에서Dev

Sort words on each line, editing the file in-place

분류에서Dev

How to place image on part of other image

분류에서Dev

django - urls.py how to differ almost same urls from each other

분류에서Dev

Replace every other occurence on the same line

분류에서Dev

Runinng command on each line and export in the same way

분류에서Dev

Number of same line in each text file

분류에서Dev

center subview according to other subview when both have the same superview

분류에서Dev

How to close Chrome window from the other application?

분류에서Dev

How Do I remove minimize, maximize, and close buttons in Ubuntu 18.04?

분류에서Dev

Running multiple command line after each other linux python

분류에서Dev

How close other element when clicked using .slideToggle

분류에서Dev

How to keep a drawn rectangle in the same place as the camera moves around

분류에서Dev

How to check a condition after each line of a function?

분류에서Dev

How to skip first element in each line of matrix?

분류에서Dev

How to append number at the beginning of each line [PHP]?

분류에서Dev

How to count the number of a specific character in each line?

분류에서Dev

How to center list menu item without text adding an extra line

분류에서Dev

I just moved the close/minimize/maxmize buttons to the right, how can I undo the action?

분류에서Dev

I just moved the close/minimize/maxmize buttons to the right, how can I undo the action?

분류에서Dev

How to print new data on the same line?

분류에서Dev

How to force button and select on the same line?

분류에서Dev

Two buttons into same form

분류에서Dev

How to print out to the same line, overriding previous line?

Related 관련 기사

  1. 1

    Labels on the same line, not under each other

  2. 2

    How to place list items that are overlapping next to each other?

  3. 3

    How to place 3 boxes nex to each other with some text inside it?

  4. 4

    How to place 2 spans beside each other with full width with CSS

  5. 5

    Pandas - bucketing events close to each other

  6. 6

    How to auto align the buttons to fit in center of the screen

  7. 7

    Sort words on each line, editing the file in-place

  8. 8

    How to place image on part of other image

  9. 9

    django - urls.py how to differ almost same urls from each other

  10. 10

    Replace every other occurence on the same line

  11. 11

    Runinng command on each line and export in the same way

  12. 12

    Number of same line in each text file

  13. 13

    center subview according to other subview when both have the same superview

  14. 14

    How to close Chrome window from the other application?

  15. 15

    How Do I remove minimize, maximize, and close buttons in Ubuntu 18.04?

  16. 16

    Running multiple command line after each other linux python

  17. 17

    How close other element when clicked using .slideToggle

  18. 18

    How to keep a drawn rectangle in the same place as the camera moves around

  19. 19

    How to check a condition after each line of a function?

  20. 20

    How to skip first element in each line of matrix?

  21. 21

    How to append number at the beginning of each line [PHP]?

  22. 22

    How to count the number of a specific character in each line?

  23. 23

    How to center list menu item without text adding an extra line

  24. 24

    I just moved the close/minimize/maxmize buttons to the right, how can I undo the action?

  25. 25

    I just moved the close/minimize/maxmize buttons to the right, how can I undo the action?

  26. 26

    How to print new data on the same line?

  27. 27

    How to force button and select on the same line?

  28. 28

    Two buttons into same form

  29. 29

    How to print out to the same line, overriding previous line?

뜨겁다태그

보관