Advertisement
Guest User

Untitled

a guest
Feb 20th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. <table>
  2. <thead>
  3. <tr>
  4. <th>
  5. <div style="background-color: lightblue; width: 600px;">
  6. <span style="display: inline-block; height:20px; background-color: red; margin: 5px 3px;float: left;">
  7. Button
  8. </span>
  9.  
  10. <span style="display: inline-block; height:20px; background-color: red; margin: 5px 3px; float:right;">
  11. Button right
  12. </span>
  13. </div>
  14. </th>
  15. </tr>
  16. </thead>
  17. <tbody>
  18. <tr><td>where did the background of the header cell go? the background is still there if the elements do not float.</td></tr>
  19. </tbody>
  20. </table>
  21.  
  22. CSS
  23. th { background-color:lightblue; width:600px; }
  24. th span { background-color:red; float:left; height:20px; margin:5px 3px; }
  25. th span:last-child { float:right }
  26.  
  27. HTML
  28. <th>
  29. <span>Button</span>
  30. <span>Button</span>
  31. <span>Button right</span>
  32. </th>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement