code_junkie

Multiple elements with same width equal to widest element

Nov 13th, 2011
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. <span id="buttonsColumn">
  2. <button type="submit" name="powerSearchSubmitButton" id="powerSearchSubmitButton">
  3. <span><em><%=ViewData.Model.T9nProvider.TranslateById("CommonWeb.Search")%></em></span>
  4. </button>
  5. <a class="linkButton" href="something">
  6. <span><em><%=ViewData.Model.T9nProvider.TranslateById("CommonWeb.Advanced")%></em></span>
  7. </a>
  8. </span>
  9.  
  10. #buttonsColumn {
  11. display: block;
  12. float: left;
  13. background-color: #F88;
  14. }
  15. #buttonsColumn button,
  16. #buttonsColumn a {
  17. display: block;
  18. }
  19. #buttonsColumn button {
  20. width: 100%;
  21. background-color: #8F8;
  22. }
  23. #buttonsColumn a {
  24. width: 100%;
  25. background-color: #88F;
  26. }
  27.  
  28. <table>
  29. <tr>
  30. <td style="width:50%">
  31. <button type="submit" style="width:100%" name="powerSearchSubmitButton" id="powerSearchSubmitButton">
  32. <span><em><%=ViewData.Model.T9nProvider.TranslateById("CommonWeb.Search")%></em></span>
  33. </button>
  34. </td>
  35. <td style="width:50%">
  36. <a class="linkButton" href="something">
  37. <span><em><%=ViewData.Model.T9nProvider.TranslateById("CommonWeb.Advanced")%></em></span>
  38. </a>
  39. </td>
  40. </tr>
  41. </table>
Add Comment
Please, Sign In to add comment