SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot
    Join Date
    Feb 2012
    Location
    US
    Posts
    145
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to escape page layout and set proper width?

    I am working on designing myself a new site within Wordpress and I wanted to set a small white section with a bottom border that adjusts to the screen size where I could put a call to action or something. But since I am putting the div in the page, it restricts to 980px. I tried forcing it and setting a negative margin but that makes my site scroll horizontally. Is there a way to escape the page confines and scale to screen size? You can see here, its the section under the black slider section...
    http://mycodeden.com/

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,296
    Mentioned
    460 Post(s)
    Tagged
    8 Thread(s)
    You have a bunch of divs set to width: 970px, and others that are 100% width. The key is not to put this special div inside one of the 970 width divs.

  3. #3
    SitePoint Mentor bronze trophy
    ronpat's Avatar
    Join Date
    Jun 2012
    Location
    NJ, USA
    Posts
    2,578
    Mentioned
    63 Post(s)
    Tagged
    2 Thread(s)
    Your site triggers a horizontal scrollbar prematurely. This can be fixed by changing the following width value:
    Code:
    element.style {
        width: 860px;    /* from 980px */
    }


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
  •