CSS Issue

Discussion in 'CSS' started by ZacharyW, Jun 26, 2009.

  1. #1
    I am trying to create a block outside of my original container, which works because I can get the block outside of the container, but my issue is adjusting the block. I want the block to be directly against the container without using absolute positioning (due to the entire forum auto adjusting)

    Can anyone tell me how I would go about getting the css div outside of the container to be directly to the side of the container without using absolute positioning?
     
    ZacharyW, Jun 26, 2009 IP
  2. drhowarddrfine

    drhowarddrfine Peon

    Messages:
    5,428
    Likes Received:
    95
    Best Answers:
    7
    Trophy Points:
    0
    #2
    Use relative positioning.
     
    drhowarddrfine, Jun 26, 2009 IP
  3. ZacharyW

    ZacharyW Peon

    Messages:
    112
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Could someone give me an example code because I cannot get this to align up against the container at all, I am totally clueless now at this point.
     
    ZacharyW, Jun 26, 2009 IP
  4. ZacharyW

    ZacharyW Peon

    Messages:
    112
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Here is some of what I am doing.

    Stylesheet:


    #container {
    background: #fff;
    width: 699px;
    color: #000;
    border: 0px solid #53718;
    border-top: 0px;
    margin: auto auto auto auto;
    text-align: left;
    }


    #sidebar {
    float: right;
    position: relative;
    display: inline-table;
    position: relative;
    width: 122px;
    height: 601px;
    color: #959487;
    background-color: #e9e9d9;
    border-right: 1px solid #dedeca;
    padding-top: 0px;
    margin: auto auto;
    }

    Template

    <div id="sidebar"></div>
    <div id="container">
     
    ZacharyW, Jun 26, 2009 IP
  5. JahRasta311

    JahRasta311 Peon

    Messages:
    201
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Not sure if I understood the problem, but that's what I'd try.
     
    JahRasta311, Jun 26, 2009 IP
  6. ZacharyW

    ZacharyW Peon

    Messages:
    112
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #6
    The issue can be found here (for some reason I got no replies in my other topic at all.)

    I can get this to work on my main page which is http://hostingreviewsbase.com as you can see the ads on the sidebar function just fine.

    However, on the forum system http://hostingreviewsbase.com/discussion I cannot get that to function correctly, and I cannot use absolute because this object will not work inside the container of the forum.
     
    ZacharyW, Jun 26, 2009 IP
  7. JahRasta311

    JahRasta311 Peon

    Messages:
    201
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Your problem makes no sense, why won't it work?
     
    JahRasta311, Jun 26, 2009 IP
  8. ZacharyW

    ZacharyW Peon

    Messages:
    112
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Its inside the container however I cannot position it, and I cannot use absolute positioning as you can see now on the discussion board.
     
    ZacharyW, Jun 26, 2009 IP