| | |
3 column layout with multiple divs
Please support our HTML and CSS advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
•
•
Join Date: Jan 2009
Posts: 33
Reputation:
Solved Threads: 0
Hello
I am new to CSS so what I am asking is probably very simple to experienced coders, I am trying to create a CSS Layout that closely mimics the look of a Cubecart 3 Store.
The site whose design I want to recreate (esp the layout) is at http://cubecart3.http.mn/
I have tried coding it but always get stuck and the result looks very horrible, can someone help me out and code the basic layout of the site at cubecart3.http.mn?
Also, I want that each 'box'(in left and right columns of the site) should be a separate div
Thanks and regards,
Arvind
I am new to CSS so what I am asking is probably very simple to experienced coders, I am trying to create a CSS Layout that closely mimics the look of a Cubecart 3 Store.
The site whose design I want to recreate (esp the layout) is at http://cubecart3.http.mn/
I have tried coding it but always get stuck and the result looks very horrible, can someone help me out and code the basic layout of the site at cubecart3.http.mn?
Also, I want that each 'box'(in left and right columns of the site) should be a separate div
Thanks and regards,
Arvind
Hi,
Very simple, I'm using inline styling, feel free to create it in a seperate stylesheet.
Very simple, I'm using inline styling, feel free to create it in a seperate stylesheet.
HTML and CSS Syntax (Toggle Plain Text)
<div id="container" style="width:100%"> <div class="header" style="width:100%; height:100px; background:purple"> <p>Header </p> </div> <div class="leftCol" style="width:20%; background:red; float:left"> <p> Left Col </p> </div> <div class="centerCol" style="width:60%; background:blue; float:left"> <p> Center Col </p> </div> <div class="rightCol" style="width:20%; background:yellow; float:right"> <p> Right Col </p> </div> <div class="footer" style="width:100%; clear:both; background:pink; height:29px"> <p> Footer </p> </div> </div>
If this reply solved your problem, please add to my reputation and don't forget to mark this thread as solved.
•
•
Join Date: Jan 2009
Posts: 33
Reputation:
Solved Threads: 0
Hello,
I want there to be multiple 'boxes' within the left and the right columns, as is shown at http://cubecart3.http.mn/. And each box consisting of one div for title (of that box) and content (of that box)
Please code this and show me how to do it
Thanks,
Arvind
I want there to be multiple 'boxes' within the left and the right columns, as is shown at http://cubecart3.http.mn/. And each box consisting of one div for title (of that box) and content (of that box)
Please code this and show me how to do it
Thanks,
Arvind
Easy... Nest your divs. Ill do one, then you should be able to take it from there.
Just style it properly according to what you want.
HTML and CSS Syntax (Toggle Plain Text)
<div id="container" style="width:100%"> <div class="header" style="width:100%; height:100px; background:purple;overflow:hidden"> <p>Header </p> </div> <div class="leftCol" style="width:20%; background:#fff; float:left; overflow:hidden"> <!-- nested div --> <div class="content_box" style="width:98%; margin: 0 auto; padding:2%;overflow:hidden"> <!-- header --> <div class="header" style="width:100%; background:orange;overflow:hidden"> <h2> heading 1 </h2> </div> <!-- content --> <div class="content" style="width:100%; background:red;overflow:hidden"> <p> content content content content content content </p> </div> </div> <!-- nested div --> <div class="content_box" style="width:98%; padding:2%;overflow:hidden"> <!-- header --> <div class="header" style="width:100%; background:orange;overflow:hidden"> <h2> heading 2 </h2> </div> <!-- content --> <div class="content" style="width:100%; background:red;overflow:hidden"> <p> content content content content content content </p> </div> </div> </div> <div class="centerCol" style="width:60%; background:blue; float:left;overflow:hidden"> <p> Center Col </p> </div> <div class="rightCol" style="width:20%; background:yellow; float:right;overflow:hidden"> <p> Right Col </p> </div> <div class="footer" style="width:100%; clear:both; background:pink; height:29px;overflow:hidden; float:left"> <p> Footer </p> </div> </div>
Just style it properly according to what you want.
If this reply solved your problem, please add to my reputation and don't forget to mark this thread as solved.
Ok dude, but you really should be tryin to do this yourself, how else you gonna learn? Anyway, here is the code seperated. Just add the css part to a .css file, and link to it from your html.
All the best.
All the best.
HTML Syntax (Toggle Plain Text)
<div id="container"> <div class="header"> <p>Header </p> </div> <div class="leftCol"> <!-- nested div --> <div class="content_box"> <!-- header --> <div class="header"> <h2> heading 1 </h2> </div> <!-- content --> <div class="content" style=""> <p> content content content content content content </p> </div> </div> <!-- nested div --> <div class="content_box"> <!-- header --> <div class="header"> <h2> heading 2 </h2> </div> <!-- content --> <div class="content"> <p> content content content content content content </p> </div> </div> </div> <div class="centerCol"> <p> Center Col </p> </div> <div class="rightCol"> <p> Right Col </p> </div> <div class="footer"> <p> Footer </p> </div> </div>
CSS Syntax (Toggle Plain Text)
#container {width:100%;} .header {width:100%; height:100px; background:purple;overflow:hidden;} .leftCol {width:20%; background:#fff; float:left; overflow:hidden;} .content_box {width:98%; margin: 0 auto; padding:2%;overflow:hidden;} .header {width:100%; background:orange;overflow:hidden;} .content_box {width:100%; background:red;overflow:hidden;} .centerCol {width:60%; background:blue; float:left;overflow:hidden} .rightCol {width:20%; background:yellow; float:right;overflow:hidden} .footer {width:100%; clear:both; background:pink; height:29px;overflow:hidden; float:left}
If this reply solved your problem, please add to my reputation and don't forget to mark this thread as solved.
•
•
Join Date: Jun 2004
Posts: 247
Reputation:
Solved Threads: 1
•
•
•
•
Hello
I am new to CSS so what I am asking is probably very simple to experienced coders, I am trying to create a CSS Layout that closely mimics the look of a Cubecart 3 Store.
The site whose design I want to recreate (esp the layout) is at http://cubecart3.http.mn/
I have tried coding it but always get stuck and the result looks very horrible, can someone help me out and code the basic layout of the site at cubecart3.http.mn?
Also, I want that each 'box'(in left and right columns of the site) should be a separate div
Thanks and regards,
Arvind
HTML and CSS Syntax (Toggle Plain Text)
<html> <head> <style type="text/css"> body { margin:0; padding:0; background:#cecece; } #wrap { width:960px; margin:0 auto; background:#fff; } #header { width:960px; height:200px; } #left { width:200px; float:left; } #middle { width:500px; float:left; } #right { width:260px; float:left; } #footer { width:960px; height:30px; } .clear { clear:both; } </style> </head> <body> <div id="wrap"> <div id="header">header logo and content</div> <div id="left">left content and divs</div> <div id="middle">middle content and divs</div> <div id="right">right content and divs</div> <div class="clear"></div> <div id="footer">copyright</div> </div> </body> </html>
![]() |
Other Threads in the HTML and CSS Forum
- Previous Thread: Simple Calculator. . Evaluate Please
- Next Thread: <h> tag problem
| Thread Tools | Search this Thread |
Tag cloud for HTML and CSS
2002 appointments asp background backgroundcolor beta browser bug calendar cart cgi code codeinjection corporateidentity create css deleted design development displayimageinsteadofflash dreamweaver drupal emailmarketing epilepsy explorer firefox flash font fonts form format frontpage google griefers hackers hitcounter hover html ide ie7 ie8 iframe image images internet internetexplorer intranet iphone javascript jpeg layout macbook maps marketshare microsoft missing mozilla multimedia navigationbars news offshoreoutsourcingcompany opacity opera optimization perl pnginie6 positioning problem scroll seo shopping studio swf swf. templates textcolor theme timecolor titletags url urlseparatedwords visual visualization web webdevelopment webform website windows7 wordpress xml xsl





