473,406 Members | 2,336 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

CSS Div layout

Hi

I'm trying to get a css layout working. One so I can use it, and two just to refine my css skills.

The idea is that each part of the page (left pane, right pane, middle pane etc) have a border around them that is a series of background images. This is because I want to have rounded corners and my own border that I've designed.

I think the biggest problem I'm having is getting these borders (.leftbar, .rightbar) to use the full height of the div they are in. If I could get this I'd be golden.


Any help?

Thanks!

Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  2. <html>
  3.   <head>
  4.   <meta http-equiv="content-type" content="text/html; charset=windows-1250">
  5.  
  6.   <title></title>
  7.  
  8.   <style>
  9.   body
  10.   {
  11.     text-align: center;
  12.  
  13.   }
  14.  
  15.   #wrapper
  16.   {
  17.     margin:  0 auto;
  18.     text-align: left;
  19.     width: 80%;
  20.     overflow: hidden;
  21.  
  22.   }
  23.  
  24.   #header
  25.   {
  26.     width: 100%;
  27.     background-color: blue;
  28.  
  29.   }
  30.  
  31.   #leftpane
  32.   {
  33.     float: left;
  34.     width: 19%;
  35.   background-color: green;
  36.   }
  37.  
  38.   #content
  39.   {
  40.  
  41.     width:50%;
  42.     float: left;
  43.     margin: 0px 1%;
  44.     background-color: red;
  45.  
  46.   }
  47.  
  48.   #rightpane
  49.   {
  50.     width: 29%;
  51.     float: right;
  52. background-color: yellow;
  53.  
  54.   }
  55.  
  56.   #footer
  57.   {
  58.     width: 100%;
  59.     clear: both;
  60. background-color: orange;
  61.   }
  62.   .topbar
  63.   {
  64.   }
  65.  
  66.   .panecontent
  67.   {
  68.     display: inline;
  69.     float:left;
  70.     width: 90%;
  71.  
  72.   }
  73.  
  74.   .leftbar
  75.   {
  76.     height: 100%;
  77.     width:5px;
  78.     display:inline;
  79.     background-color: black;
  80.     float:left;
  81.   }
  82.  
  83.   .rightbar
  84.   {
  85.     height: 100%;
  86.     width: 5px;
  87.     display:inline;
  88.     background-color: black;
  89.     float: right;
  90.     margin: 0px;
  91.   }
  92.  
  93.   .bottombar
  94.   {
  95.  
  96.   }
  97.  
  98.  
  99.   </style>
  100.  
  101.  
  102.   </head>
  103.   <body>
  104.       <div id="wrapper">
  105.       <br>
  106.           <div id="header">
  107.           <br>
  108.           </div>
  109.  
  110.           <div id="mainbody">
  111.           <br>
  112.             <div id="leftpane">
  113.               <div class="topbar"></div>
  114.               <div class="leftbar"></div>
  115.               <div class="panecontent">
  116.               menu menu menu menu menu menu menu menu menu menu menu menu menu menu menu menu menu menu menu menu menu menu menu menu
  117.               </div>
  118.               <div class="bottombar"></div>
  119.               <div class="rightbar"></div>
  120.             <br>
  121.             </div>
  122.  
  123.             <div id="content">
  124.               <div class="topbar"></div>
  125.               <div class="leftbar"></div>
  126.               <div class="panecontent">
  127.               body body bodybody body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body   body body bodybody body body body body body body body body body body body body body body body body body body body body body body body body body body body body body bodybody body body body body body body body body bodybody body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body bodybody body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body bodybody body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body body
  128.               </div>
  129.               <div class="bottombar"></div>
  130.               <div class="rightbar"></div>
  131.             </div>
  132.  
  133.             <div id="rightpane">
  134.               <div class="topbar"></div>
  135.               <div class="leftbar"></div>
  136.               <div class="panecontent">
  137.               rightside rightside rightside rightside rightside rightside rightside rightside rightside rightside rightside rightside rightside rightside rightside rightside rightside rightside rightside rightside rightside rightside rightside rightside rightside rightside rightside rightside rightside rightside rightside rightside rightside rightside rightside rightside rightside rightside rightside rightside rightside rightside rightside rightside  
  138.               </div>
  139.               <div class="bottombar"></div>
  140.               <div class="rightbar"></div>
  141.             </div>
  142.  
  143.         <br>  
  144.           </div>      
  145.     <br>
  146.           <div id="footer">
  147.               <div class="topbar"></div>
  148.               <div class="leftbar"></div>
  149.               <div class="panecontent">
  150.               footer footer footer footer footer footer footer footer footer footer footer footer footer footer footer footer footer footer footer footer footer footer footer footer footer footer footer footer footer footer footer footer footer footer footer footer footer footer footer footer  
  151.               </div>
  152.               <div class="bottombar"></div>
  153.               <div class="rightbar"></div>
  154.           </div>
  155.  
  156.       </div>
  157.   </body>
  158. </html>
  159.  
Jun 8 '09 #1
9 2688
drhowarddrfine
7,435 Expert 4TB
They are using full height.

No one has any need to use the transitional doctype. Always use strict. See the article about doctypes under topics->html->insights above.
Jun 8 '09 #2
drhowarddrfine
7,435 Expert 4TB
Oh, I see you were looking in IE. Never, ever use IE to test anything until it's working in the more modern browsers first. 11 years behind modern standards and practices, it's never to be trusted to do anything right.

Interesting it happens in IE7 and 8. I'll have a look.

Fix this: <style type="text/css">
Jun 8 '09 #3
drhowarddrfine
7,435 Expert 4TB
I've got the flu really bad and it's hard to think clearly but I'm bored just laying in bed all weekend.

Your doctype is also incorrect and throwing IE into quirks mode. When you see the article, you'll be given the correct doctype. Once done, IE and FF will perform the same though not what you want.
Jun 8 '09 #4
prabirchoudhury
162 100+
hey

1. you could draw border around the <div> using like

Expand|Select|Wrap|Line Numbers
  1.        #header 
  2.   { 
  3.     width: 100%; 
  4.     background-color: blue;
  5.     border: 4px solid #999593;
  6.  
  7.   } 
  8. or #header 
  9.   { 
  10.    border-width:thik; 
  11.   border-color:#854841; 
  12.   border-style:double; 
  13.  
  14.   } 
  15.  
  16.  
need more help

CSS and Borders
Jun 8 '09 #5
I could use a border, but although its not shown in my example, the plan was to use background images so I can use the border I've designed.
Jun 8 '09 #6
It is little a bit difficult div base layout.
If you can handle the mozela problem then you can start getting free lancing.
Jun 9 '09 #7
This stickers printing site is one of good example of such layout with fly menus.
Jun 9 '09 #8
I don't really see what that has to do with using graphic custom css borders.
Jun 9 '09 #9
drhowarddrfine
7,435 Expert 4TB
I'm starting to perk up a bit today. Both your problems are solved with css3; rounded corners today, custom borders tomorrow, but none will work in IE, of course, only modern browsers.

If I'm feeling better later today I'll look deeper into this but I have to go to Chicago tomorrow so....
Jun 9 '09 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

82
by: Peter Diedrich | last post by:
The site design is pretty simple: ============================================ | Head | ============================================ | | ...
39
by: Zak McGregor | last post by:
Hi all Are there any good solutions to aligning form field names and input boxes without resorting to tables? I am struggling to do this nicely at the moment. Thanks Ciao Zak
47
by: Neal | last post by:
Patrick Griffiths weighs in on the CSS vs table layout debate in his blog entry "Tables my ass" - http://www.htmldog.com/ptg/archives/000049.php . A quite good article.
20
by: Tammy | last post by:
What would be a good alternative to using frames? I need something that will section my webpage into two halves and can change both frames on a single click. Thanks in Advance, Tammy
10
by: Volker Lenhardt | last post by:
For a QApplication (PyQt) on the small screen of my Zaurus 5500 PDA I try to layout my data output in a QScrollView as the central widget. I'd prefer to use QGridLayout, but cannot add it to the...
10
by: Luke | last post by:
Hi. I am trying to make correct layout, here is an example of (dynamically generated content via jsp): http://localhost/www/layout.htm Most outer div is positioned absolute (if not then it...
3
by: Samuel Shulman | last post by:
I am looking for good guidance for positioning controls on the form.document, it is absolute nightmare and I don't know where to begin Thank you, Samuel Shulman
5
by: Jeff User | last post by:
Hi all I am writing program/framework to server a web site dynamically based on stored web page data with C#, .net1.1 What is the preferred means of controlling page layout, frames or...
5
by: Ed Sproull [MSFT] | last post by:
First I'm pretty new to ASP.NET and I'm having a simple problem. I have small website with a header, sidebar and the the content. I want my content to appear beside my sidebar which seems to be a...
53
by: brave1979 | last post by:
Please check out my javascript library that allows you to create any layout for your web page, nested as deep as you like, adjusting to width and height of a browser window. You just describe it in...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.