Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    May 2009
    Posts
    26
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Problem with Standard Question

    Hey Everyone,

    I have a sidebar made up of a group of Div's that I want to position at...say...on the right side of my screen via CSS. I would like it to function similar to the righthand side bar on www.twitter.com, so that it moves slightly with the rest of the content when resizing the window. Here's what I have so far, what would I need to add to get this behavior? Right now my box just chills in the upper left hand portion of the screen no matter what I do.

    Code:
    <body id="myBody">
    	<div id="sideBarNav">
    		<div id="acctToggle">
    			<b>+My Section+++</b>
    		</div>
    		<div id="acctSection">
    			<div id="acctSectionElement">
    				Content
    			</div>
    			<div id="acctSectionElement">
    				Content2
    			</div>
    		</div>
    	</div>
    </body>
    ...and...
    Code:
    #myBody {
    height: 100%;
    width: 100%;
    padding: 0px;
    background: #000000;
    text-align: center;
    }
    #sideBarNav{
    position: relative;
    float: left;
    color: #333333;
    width: 30%;
    margin: 0 auto;
    }
    I know I'm a noob to CSS still but appreciate the help. I'm assuming this is a pretty easy change to make. I even got the float down to separate my content correctly I believe? =)

    Thanks

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,865
    Thanks
    160
    Thanked 2,224 Times in 2,211 Posts
    Take a look at http://bonrouge.com/2c-hf-fluid(r).php
    (You may set a fixed with to the #wrap if required)
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)


  •  

    Posting Permissions

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