Guest User

Untitled

a guest
Apr 23rd, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. <section>
  2. <!-- Header should wrap to second if needed, based on how much button element uses space -->
  3. <h1>
  4. Dynamic text that should wrap to second line if needed, because the text is sometimes pretty long
  5. </h1>
  6. <!-- Button should use as much space as possible to fit the text on one line-->
  7. <button>
  8. Dynamic button text
  9. </button>
  10. </section>
  11.  
  12.  
  13. section {
  14. width: 600px;
  15. }
  16.  
  17. h1 {
  18. float: left;
  19. /* Width can't be used here, cos the texts are different length at different times */
  20. width: 400px;
  21. }
  22.  
  23. button {
  24. float: right;
  25. margin-top: 20px;
  26. }
Add Comment
Please, Sign In to add comment