SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Jun 2002
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Angry problem with setting width to 100%

    I have a div element whose width is set to 100% but I can't seem to get it to actually be the entire width of the screen. What am I doing wrong?

    #myDiv {
    width: 100%;
    position: absolute;
    left: 0px;
    top: 0px;
    background-color: red;
    }

    Thanks
    Tim

  2. #2
    SitePoint Wizard
    Join Date
    Oct 2001
    Location
    Tucson, Arizona
    Posts
    1,858
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Add this to your style sheet:
    Code:
    body {
      margin: 0;
      padding: 0;
    }

  3. #3
    SitePoint Enthusiast
    Join Date
    Jun 2002
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    still not working

    Thanks! That did the trick.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •