473,386 Members | 1,815 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,386 software developers and data experts.

What's wrong with this page?

108 100+
The menus and the text at the bottom are in the div#body tag.. I've set a border of green for this.. The menus and the bottom text should have been within this green border but they are not..
What's wrong with the codes? Why don't they fit withing the border?
Expand|Select|Wrap|Line Numbers
  1.  
  2.     <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3.     <html xmlns="http://www.w3.org/1999/xhtml">
  4.     <head>
  5.     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6.     <   title>TLJ_Produits_Non_Alimentaires</title>
  7.  
  8.     <style type="text/css" media="all">
  9.     /*-------------------------
  10.     CSS reset
  11.     ----------------------------*/
  12.     html{margin:0px;padding:0px;width:1020px;height:auto;}
  13.  
  14.     .wrapper{background:url(images/bgbg.jpg) repeat-y;width:100%;min-height:100%;margin-top:0px;margin-left:auto;margin-right:auto;padding:0px;font-family:Georgia, "Times New Roman", Times, serif;line-height:1px}
  15.  
  16.     /* Border*/    
  17.     .top{width:977px;height:21px;background:url(images/top.png) no-repeat;}
  18.  
  19.     .content{width:977px;height:auto;background:url(images/bg.png) repeat-y;}
  20.  
  21.     .bottom{width:977px;height:21px;background:url(images/bottom.png) no-repeat;}
  22.  
  23.     /*-------------------------
  24.     CSS for header
  25.     --------------------------*/
  26.  
  27.  
  28.     .header{width:100%;height:auto;}
  29.  
  30.  
  31.     /*-------------------------
  32.     CSS for menu
  33.     --------------------------*/
  34.  
  35.     .menubar{margin-left:10px;width:100%;clear:both;height:68px}
  36.  
  37.     .menu{background:url(images/menu.png) no-repeat; width:127px;height:68px;list-style:none;float:left;margin-top:10px;padding-top:10px;clear:both;}
  38.     .text{font-weight:bold;font-size:11px;text-transform:uppercase;line-height:1;margin-top:40px;text-decoration:none;}
  39.  
  40.  
  41.     #body{width:100%;border:#099 thin groove;}
  42.  
  43.         #body p{margin-left:200px;float:left;clear:both;}
  44.  
  45.  
  46.         p.text{color:#060;border:#060 thick groove;padding-left:100px;margin-top:00px;width:600px;margin-right:100px;}
  47.     </style>
  48.     </head>
  49.  
  50.      <body>
  51.  
  52.     <div class="wrapper purple">
  53.  
  54.                     <div class="top"> </div>
  55.  
  56.                        <div class="content">
  57.                                 <div class="header">
  58.  
  59.  
  60.  
  61.                                             <ul class="menubar white" >
  62.  
  63.                                                         <li class="menu">
  64.                                                                         <div id="redbar">lundi</div>
  65.                                                                        <a href="#" class="text purple">Pourquoi <br />tous les jours</a>
  66.                                                         </li>
  67.  
  68.                                                         <li class="menu">
  69.                                                                         <div id="redbar">mardi</div>
  70.                                                                         <a href="#" class="text purple">produits <br />alimentaires</a>
  71.                                                         </li>
  72.  
  73.                                                         <li class="menu">
  74.                                                                         <div id="redbar">mercredi</div>
  75.                                                                         <a href="#" class="text purple">produits<br />non-alimentaires</a>
  76.                                                         </li>
  77.  
  78.                                                         <li class="menu">
  79.                                                                         <div id="redbar">jeudi</div>
  80.                                                                         <a href="#" class="text purple">tout<br />comprendre</a>
  81.                                                         </li>
  82.  
  83.                                                         <li class="menu">
  84.                                                                         <div id="redbar">vendredi</div>
  85.                                                                         <a href="#" class="text purple">trouvez nos<br />produits</a>
  86.                                                         </li>
  87.  
  88.                                                         <li class="menu">
  89.                                                                         <div id="redbar">samedi</div>
  90.                                                                         <a href="#" class="text purple">contactez-nous</a>
  91.                                                         </li>
  92.  
  93.                                                         <li class="menu">
  94.                                                                         <div id="bluebar">dimanche</div>
  95.                                                                         <a href="#" class="text purple">j'aime</a>
  96.                                                         </li>
  97.                                             </ul>
  98.  
  99.                                 </div>
  100.  
  101.  
  102.  
  103.                                 <div id="body">
  104.  
  105.                                             <p class="text purple">retrouvez notre gamme de produits non alientaires. bientot plus de 300 references du quotidien.</p>
  106.  
  107.  
  108.  
  109.  
  110.                                 </div>
  111.  
  112.  
  113.                     </div>
  114.  
  115.                     <div class="bottom"></div> 
  116.     </div>
  117.  
  118.  
  119.  
  120. </body>
  121. </html>
  122.  
  123.  
Here's the screenshot
http://jsbin.com/apizu4
Jun 5 '11 #1

✓ answered by drhowarddrfine

Elements are NEVER to expand to contain floated elements which are removed from the normal flow. To get parent elements to do such a thing, you need to either float them or add 'overflow:auto' to contain elements that overflow the boundaries.

1 1267
drhowarddrfine
7,435 Expert 4TB
Elements are NEVER to expand to contain floated elements which are removed from the normal flow. To get parent elements to do such a thing, you need to either float them or add 'overflow:auto' to contain elements that overflow the boundaries.
Jun 6 '11 #2

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

Similar topics

5
by: tin | last post by:
<script language="Javascript"> <!-- function apri (theURL,winName,features){ window.open (theURL,winName,features); var a=null; oldwindow = window.self; oldwindow.opener = window.self;...
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.
10
by: G Matthew J | last post by:
interesting "signal vs. noise" blog entry: http://37signals.com/svn/archives2/whats_wrong_with_ajax.php
2
by: Nuit Blanche | last post by:
Hi, I'd deeply appreciate if anyone can come out and rescue. It appears to be a simply problem. But I just can't make it work. Suppose I set up a frame document like the following (see...
15
by: charlie fortune | last post by:
I'm quite new to HTML, and have seen <marquee> get bad press here. What's wrong with using it. I wanted to have the contents of a .txt file scrolling for news items, can I do this with marquee, or...
5
by: plugimi | last post by:
hi i've got kind of a strange problem i'm struggeling with here. this page: http://www.pohflepp.de/eavesdripping4.html won't be recognized as html/xml by firefox. i've tried everything that...
14
by: VMI | last post by:
Everytime I open my machine's MSDN and look for a subject, when I double-click on anything, I get "The page cannot be displayed" . What's wrong?
0
by: Alessandro Rinaldi | last post by:
Hi all, what's wrong in this ? I added a simple Control with viewstate (ie : label, or my User control... ) dinamically in the controls collection of a TD cell created dynamically too, i lose...
12
by: questions? | last post by:
I am testing a problem with linked list. I just do a lot of times: create a list, then free it. ############################################# # include <stdio.h> # include <stdlib.h> struct...
2
by: Rod | last post by:
I've been struggling with this thing for 2 days, and after searching the 'net for help, I cannot find what is wrong. We're using Crystal Reports XI Release 2, with Visual Studio .NET 2003 in...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...

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.