SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Sep 2004
    Posts
    67
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Positioning Content-Area 10px From the Right Always

    Hello all.

    I have recently discovered that CSS is not just a formatting tool, but should be used mainly for separating content from the design and layout. This revelation also came with a realization, I don't really know as much as I thought I did about coding CSS. So, here's my problem:

    I would like to be able to position a content-area-box-layer-type-thing (is there a name for them?) on the right side of the page, always 10px from the right side (even if the user resizes the window).

    This is what I have so far:

    Code:
    #logo_right {
      	position: absolute;
      	width: 70px;
      	height: 70px;
      	left: 92%;
      	margin-right: 10px;
      	top: 10px;
      	background-color: green;
      }
    Obviously, however, that does not work. Can someone point me in the right direction?

    Also, a separate question: Is there a way to specify a content-area's height by making it the same as another area's height? I cannot just use the same code for the first content-area because the second content-area's height is determined by text inside of it.

    TIA,
    - Fotinakis

  2. #2
    SitePoint Enthusiast
    Join Date
    Sep 2004
    Posts
    67
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Scratch that! I figured it out. Here's how I did it (pretty simple and straightforward really):

    Code:
    #logo_right {
     	position: absolute;
     	width: 70px;
     	height: 70px;
     	right: 10px;
     	top: 10px;
     	background-color: green;
     }
    So how about my second question?

    - Fotinakis


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
  •