Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 28th, 2012  |  syntax: None  |  size: 1.49 KB  |  hits: 12  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. How to make div box actually touching the side of the browser as mine has a gap?
  2. <html>
  3. <head>
  4. <link href="test.css" rel="stylesheet" type="text/css" />
  5. </head>
  6. <body>
  7.  
  8. <div class="footer" style="position:absolute;bottom:0;">
  9. Footer
  10. </div>
  11.  
  12. </body>
  13. </html>
  14.        
  15. .footer {
  16.     background: #ffffff;
  17.     border: 1px solid;
  18.     color: #e6e6e6;
  19.     height: 50px;
  20.     width: 100%;
  21.     position:absolute;
  22.     float: left;
  23.     margin: 0px 0px 0px 0px;
  24. }
  25.        
  26. body, html
  27. {
  28.   width: 100%;
  29.   height: 100%;
  30.   padding: 0px;
  31.   margin: 0px;
  32. }
  33.        
  34. html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
  35.     margin: 0;
  36.     padding: 0;
  37.     border: 0;
  38.     outline: 0;
  39.     font-size: 100%;
  40.     vertical-align: baseline;
  41.     background: transparent;
  42. }
  43. body {
  44.     line-height: 1;
  45. }
  46. ol, ul {
  47.     list-style: none;
  48. }
  49. blockquote, q {
  50.     quotes: none;
  51. }
  52. blockquote:before, blockquote:after, q:before, q:after {
  53.     content: '';
  54.     content: none;
  55. }
  56. /* remember to define focus styles! */
  57. :focus {
  58.     outline: 0;
  59. }
  60. /* remember to highlight inserts somehow! */
  61. ins {
  62.     text-decoration: none;
  63. }
  64. del {
  65.     text-decoration: line-through;
  66. }
  67. /* tables still need 'cellspacing="0"' in the markup */
  68. table {
  69.     border-collapse: collapse;
  70.     border-spacing: 0;
  71. }