Results 1 to 1 of 1

Thread: Help centering a div within a div

  1. #1
    Join Date
    Dec 2007
    Posts
    31
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Help centering a div within a div

    Hello,


    I'm using css to make a box border with images around all of my content. I think i've got with box in order but i'm not sure how to make the div within the box center.

    Right now the (.content div) against the left side of the <.content> div. I would like to have (.content div) horizontally centered within <.content>.

    Any idea how I do that?

    Code:
    .content{
    	background: url(images/rr.jpg) center right repeat-y;
    	clear: both;
    	margin-right: 30px;
    	margin-left: 30px;
    }
    	.content div{
    		background: url(images/ll.jpg) center left repeat-y;
    		width: 800px;
    		padding-top: 1px;
    		padding-bottom: 25px;	
    }

    removed width and it works!!
    Last edited by Snot; 08-12-2009 at 08:42 PM. Reason: Solved

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
  •