Advertisement
ndburrus

Bootstrap SS @AlexSigner1

Aug 17th, 2016
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.81 KB | None | 0 0
  1. // Bootstrap Grid to Put Elements Side By Side
  2. // @AlexSigner
  3.  
  4. <!-- for the section of code posted, we are handling the 3 buttons Like, Info, and Delete.
  5. the code structure should be
  6. <div...>
  7. <div...>
  8. <button...>Like</button>
  9. </div>
  10. // add 2 buttons (Info, & Delete here - same format as Like button)
  11. </div>
  12. the class for the outermost div should be "row"
  13. the class for each button div should be "col-xs-4"
  14. each button should have 3 classes: btn, btn-block, & btn-info -->
  15.  
  16. <!-- let's use the structure presented above.
  17. so, we will have a div that wraps (opening & closing tag/s) all of buttons - this is the outermost div for this code section.
  18. each button will be wrapped in a div.
  19. ok, so starting with the outermost div, we need to add the row "class". so the outermost div will
  20. look like this: <div class="row">.
  21. the format for each div wrapping the buttons is the same. however, we need to ensure that each button has
  22. 3 classes (mentioned above). so each button's div will look like this: <div class="btn btn-block btn-danger>.
  23. obviously, each set of button tags will wrap the button name (Like, Info, &/or Delete). -->
  24.  
  25. so, in the above format example, the first button code would look like this:
  26.  
  27. <div class="row">
  28. <div class="col-xs-4">
  29. <button class="btn btn-block btn-primary">Like</button>
  30. </div>
  31. ...now add the next 2 buttons.
  32.  
  33.  
  34.  
  35. <div class="row"><button class="btn btn-block btn-primary">Like</button><button class="btn btn-block btn-info">Info</button><button class="btn btn-block btn-danger">Delete</button></div>
  36. <div class="col-xs-4"><button class="btn btn-block btn-primary">Like</button></div>
  37. <div class="col-xs-4"><button class="btn btn-block btn-info">Info</button></div>
  38. <div class="col-xs-4"><button class="btn btn-block btn-danger">Delete</button></div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement