473,748 Members | 2,690 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

What's wrong with this page?

108 New Member
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
1 1286
drhowarddrfine
7,435 Recognized Expert Expert
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
1843
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; oldwindow.close(); } -->
47
9153
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
2067
by: G Matthew J | last post by:
interesting "signal vs. noise" blog entry: http://37signals.com/svn/archives2/whats_wrong_with_ajax.php
2
1803
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 http://www.peace-on-earth.org/temp/test.html for actual effect) <frameset cols="15%,*" frameborder="NO" border="0" framespacing="0"> <frame src="blue.html" scrolling="NO" noresize> <frameset rows="100,*" frameborder="NO" border="0" framespacing="0">
15
10416
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 should I be looking at applets ?
5
1759
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 i could think of but still it doesn't work. looks great in safari, though.
14
1788
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
953
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 the viewstate. not in the postback but just at the First time the page running ! Sincerly the td cell is added again at the tr control and then in a table control (every one loaded dinamically)
12
1882
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 element { int index; struct element *next;
2
3615
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 an ASP.NET 1.1 application. I've got a CrystralReportsViewer control on an ASP.NET page. Once the page gets hit I get the following error message (this is running on my development machine):
0
8995
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8832
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9561
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9381
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9332
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9254
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6078
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3316
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2791
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.