Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Software Development
Programming
Programming Q&A
How to place a div box next to another centered div?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Brackson" data-source="post: 238383" data-attributes="member: 34747"><p>By reading what he<em> suggested</em> to do, I edited it <em>myself</em>, and it's working now.</p><p></p><p>Here's the updated code.</p><p>[CODE]#boxcontainer{</p><p> width:1215px;</p><p> margin:0 auto;</p><p>}</p><p></p><p>#leftbox {</p><p> float:left;</p><p> width:200px;</p><p> background-color:white;</p><p> border:1px solid black;</p><p> -webkit-border-radius: 10px;</p><p> -moz-border-radius: 10px;</p><p> border-radius: 10px;</p><p> overflow:hidden;</p><p> box-shadow: 1px 1px 2px #888888;</p><p> padding:10px;</p><p>}</p><p></p><p>#rightbox {</p><p> float:right;</p><p> width:200px;</p><p> background-color:white;</p><p> border:1px solid black;</p><p> -webkit-border-radius: 10px;</p><p> -moz-border-radius: 10px;</p><p> border-radius: 10px;</p><p> overflow:hidden;</p><p> box-shadow: 1px 1px 2px #888888;</p><p> padding:10px;</p><p>}[/CODE]</p><p></p><p>[HTML] <div id="boxcontainer"></p><p> <div id="leftbox"></p><p> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse at tincidunt purus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque et mattis metus. Vestibulum pellentesque dapibus accumsan. Aliquam pharetra ultrices dolor, sed tincidunt urna facilisis ut. Morbi nec risus egestas, luctus sapien eget, facilisis elit. Aliquam malesuada tristique quam, in venenatis tellus dignissim in. Aliquam metus quam, eleifend sit amet euismod eget, tincidunt fermentum massa. Nunc auctor lobortis justo quis pharetra. Fusce tincidunt pellentesque sapien. Cras sem tellus, ultrices a sem a, molestie aliquet metus.</p></p><p> </div></p><p></p><p> <div id="rightbox"></p><p> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse at tincidunt purus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque et mattis metus. Vestibulum pellentesque dapibus accumsan. Aliquam pharetra ultrices dolor, sed tincidunt urna facilisis ut. Morbi nec risus egestas, luctus sapien eget, facilisis elit. Aliquam malesuada tristique quam, in venenatis tellus dignissim in. Aliquam metus quam, eleifend sit amet euismod eget, tincidunt fermentum massa. Nunc auctor lobortis justo quis pharetra. Fusce tincidunt pellentesque sapien. Cras sem tellus, ultrices a sem a, molestie aliquet metus.</p></p><p> </div></p><p> </div>[/HTML]</p><p></p><p>And a screenshot: <a href="http://i.imgur.com/oqTlEcQ.png" target="_blank">here</a>.</p></blockquote><p></p>
[QUOTE="Brackson, post: 238383, member: 34747"] By reading what he[I] suggested[/I] to do, I edited it [I]myself[/I], and it's working now. Here's the updated code. [CODE]#boxcontainer{ width:1215px; margin:0 auto; } #leftbox { float:left; width:200px; background-color:white; border:1px solid black; -webkit-border-radius: 10px; -moz-border-radius: 10px; border-radius: 10px; overflow:hidden; box-shadow: 1px 1px 2px #888888; padding:10px; } #rightbox { float:right; width:200px; background-color:white; border:1px solid black; -webkit-border-radius: 10px; -moz-border-radius: 10px; border-radius: 10px; overflow:hidden; box-shadow: 1px 1px 2px #888888; padding:10px; }[/CODE] [HTML] <div id="boxcontainer"> <div id="leftbox"> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse at tincidunt purus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque et mattis metus. Vestibulum pellentesque dapibus accumsan. Aliquam pharetra ultrices dolor, sed tincidunt urna facilisis ut. Morbi nec risus egestas, luctus sapien eget, facilisis elit. Aliquam malesuada tristique quam, in venenatis tellus dignissim in. Aliquam metus quam, eleifend sit amet euismod eget, tincidunt fermentum massa. Nunc auctor lobortis justo quis pharetra. Fusce tincidunt pellentesque sapien. Cras sem tellus, ultrices a sem a, molestie aliquet metus.</p> </div> <div id="rightbox"> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse at tincidunt purus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque et mattis metus. Vestibulum pellentesque dapibus accumsan. Aliquam pharetra ultrices dolor, sed tincidunt urna facilisis ut. Morbi nec risus egestas, luctus sapien eget, facilisis elit. Aliquam malesuada tristique quam, in venenatis tellus dignissim in. Aliquam metus quam, eleifend sit amet euismod eget, tincidunt fermentum massa. Nunc auctor lobortis justo quis pharetra. Fusce tincidunt pellentesque sapien. Cras sem tellus, ultrices a sem a, molestie aliquet metus.</p> </div> </div>[/HTML] And a screenshot: [URL='http://i.imgur.com/oqTlEcQ.png']here[/URL]. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Software Development
Programming
Programming Q&A
How to place a div box next to another centered div?
Top