• Lucid Dreaming - Dream Views




    Results 1 to 8 of 8

    Threaded View

    1. #1
      Bird Brain Achievements:
      Tagger First Class Populated Wall 10000 Hall Points Referrer Bronze Veteran First Class Vivid Dream Journal
      Puffin's Avatar
      Join Date
      Oct 2009
      LD Count
      Lost count.
      Location
      Vancouver, BC.
      Posts
      6,337
      Likes
      2065
      DJ Entries
      212

      Need help centering a div layer in any resolution/screen size.

      I'm working on a website (obviously the one implied in my signature), and I'm having a minor but extremely annoying issue. I'm able to center this div layer, see. But on the pages that have a scrollbar, it still centers, but the div layer moves over to the left a bit because of the scrollbar (it chops off ten or so pixels and that space no longer counts as part of the actual page space, which is what the code I'm using needs to work).

      This is the css and html I'm working with.

      HTML Code:
      THE CSS...
      .container {
        position: relative;       /* make this a containing block! */
        border: 1px dotted red;   /* mark this element visually prominent */
      }
      .center {
        position: absolute;       /* take element out of the normal page flow! */
        top: 10px;                /* position the element vertically using top or bottom
                                     and define width as you like:*/
        width: 50%;   
        left: 0;                  /* set left and right to the same value! */
        right: 0;
        margin-left: auto;        /* adding auto-margins left and right will
                                     center the element horizontally!*/
        margin-right: auto;
        background:red;           /* mark this element visually prominent */
      }
      
      - - -
      
      NOW THE HTML PART...
      
      <div class="container">
      <div class="center">
      <div class="main">
      TEXT WILL BE GOING HERE.
      </div>
      </div>
      </div>
      If only the div layers could stay unchanged in position, even if the scrolllbar's there. Thanks... Whoever helps gets a cookie and a big thank-you from me.
      Last edited by Puffin; 08-31-2010 at 06:12 AM.
      We all live in a kind of continuous dream. When we wake, it is because something,
      some event, some pinprick even, disturbs the edges of what we have taken as reality.

      Vandermeer

      SAT (Sporadic Awareness Technique) Guide
      Have questions about lucid dreaming? DM me.

    Similar Threads

    1. Layer 0 on first night
      By FuzzyWuzzy in forum Introduction Zone
      Replies: 16
      Last Post: 08-16-2009, 02:21 PM
    2. Layer Zero Dream
      By Bioshock in forum Introduction Zone
      Replies: 8
      Last Post: 07-19-2008, 05:41 AM
    3. What Screen Resolution Do You Guys Use?
      By arby in forum Tech Talk
      Replies: 41
      Last Post: 04-24-2007, 01:35 AM
    4. Multi-Layer Consciousness Model LDing device
      By Yatahaze in forum Attaining Lucidity
      Replies: 5
      Last Post: 07-07-2006, 10:17 AM
    5. What layer of hell are YOU going to?
      By Damascus in forum The Lounge
      Replies: 70
      Last Post: 02-18-2005, 01:16 AM

    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
    •