473,885 Members | 2,514 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Why is there a space in between my divs?

12 New Member
For some reason there is a gap in between some of my <divs>. It doesn't happen at the top to my header and navbar but once I go into my body it starts and I can't figure out why. any help would be greatly appreciated. Heres the link to the page : http://naturalfoodrepo rts.com/chiaseedreport. php

and heres all the code on that page:
Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <title>Natural Food Reports</title>
  6. <link href="root/reports style/reports.css" rel="stylesheet" type="text/css" />
  7. </head>
  8.  
  9. <body>
  10. <div id="wrapper">
  11. <div id="header">
  12.     <div id="title"><a href="index.php" class="titlelink">Natural Food Reports</a></div>
  13.   </div>
  14. <div id="navbar">
  15.   <div id="homereportsaboutcontact"><a href="index.php"> Home</a> | <a href="reports.php">Reports</a> | <a href="about.php">About</a> | <a href="contact.php">Contact</a></div>
  16. </div>
  17. <div id="reportstitle">
  18.   <p>~Chia Seeds~</p>
  19.   <p><img src="imgs/Health &amp; Super Foods/ChiaSeeds&amp;OtherSeeds/chia seeds.jpg" alt="chiaseeds" width="200" height="200" border="0" /></p>
  20. </div>
  21. <div id="researchresultstitle";>Research Results:</div>
  22. <div id="researchresults">
  23.   <p>&quot;...when you hydrate the seeds in water the seeds shell opens up and absorbs   up to nine times its volume in water. This then forms a gel, which is   called Chia Seed Gel. It is said that the gel has the potential to help   keep your body hydrated. The gel is also 90% soluble fiber, which may be   beneficial for your digestive track. Many people say that they use the   seeds when they are involved in sports or physical activities for   endurance.&quot; </p>
  24.   <p>&quot;....the seeds have twice the protein of any other seed or grain, five times   the calcium of milk, boron which is trace mineral that helps transfer   calcium into your bones, omega 3 and omega 6 which are essential oils   for the body.&quot;</p>
  25. <p>&quot; ...the soluble fiber in the gel forms a wall between carbohydrates and the   body, releasing them slowly into the body. Dieters love the seeds   because it can be added to any food or drink in a ratio of 75% to the   volume of food or drink and will not change the taste. Because the   carbohydrates are released slowly you may get the feeling of being full.   Many use the seeds as a way to control their appetites. The gel has no   taste.&quot; </p>
  26. </div>
  27. <div id="logo">Eat Better. Feel Better. Live Better.</div>
  28.   <div id="footer">&copy; 2010  Natural Food Reports
  29. </div>
  30. </div>
  31. </body>
  32. </html>
  33.  



Heres the code on my external style sheet attached to that page:

Expand|Select|Wrap|Line Numbers
  1. body {
  2.     margin: 0px;
  3.     font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;
  4.     background-image: url(v2bg.jpg);
  5. }
  6.  
  7. #wrapper {
  8.     margin: 0px;
  9. }
  10.  
  11. #header {
  12.     background-image: url(newbanner.jpg);
  13.     height: 200px;
  14. }
  15.  
  16. #title {
  17.     font-family: "Lucida Console", Monaco, monospace;
  18.     font-size: 55px;
  19.     color: #000;
  20.     position: absolute;
  21.     left: 320px;
  22.     top: 79px;
  23.     width: 669px;
  24.     height: 58px;
  25. }
  26. .titlelink:link{
  27.     color:#000;
  28.     text-decoration:none;
  29.     font-size: 50px;
  30.     font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;
  31. }
  32. .titlelink:hover { color:#000;
  33. }
  34. .titlelink:visited{ color:#000;
  35. text-decoration:none;
  36. }
  37. .titlelink:active{ color:#000;
  38. text-decoration:none;
  39. }
  40. #logo {
  41.     position:absolute;
  42.     width:284px;
  43.     height:32px;
  44.     z-index:1;
  45.     left: 322px;
  46.     top: 130px;
  47.     color: #FFF;
  48. }
  49. #navbar {
  50.     background-color: #FFF;
  51.     background-image: url(navbar.jpg);
  52.     background-repeat: no-repeat;
  53.     height: 30px;
  54.     width: 100%;
  55.     margin: 0px;
  56. }
  57. #homereportsaboutcontact {
  58.     color: #000;
  59.     margin-left: 400px;
  60. }
  61. #reportstitle{
  62.     font-size: 24px;
  63.     color: #000;
  64.     font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;
  65.     text-decoration: none;
  66.     background-color: #FFF;
  67.     text-align: center;
  68.     width: 800px;
  69.     margin-right: auto;
  70.     margin-left: auto;
  71.     clip: rect(0px,auto,auto,auto);
  72. }
  73. #researchresultstitle {
  74.     font-size: 24px;
  75.     text-align: center;
  76.     background-color: #FFF;
  77.     margin-top: 0px;
  78.     width: 800px;
  79.     margin-right: auto;
  80.     margin-left: auto;
  81. }
  82. #researchresults {
  83.     background-color: #FFF;
  84.     margin-right: auto;
  85.     margin-left: auto;
  86.     width: 800px;
  87.     font-size: 14px;
  88. }
  89.  
  90. #footer {
  91.     background-color: #999;
  92.     height: 60px;
  93.     text-align: center;
  94.     font-weight: bold;
  95.     margin-bottom: 0px;
  96. }
  97.  
  98.  
  99.  
  100.  
  101.  
  102. .bluelinks:link {
  103.     color:#00F;
  104.     font-size: 14px;
  105. }
  106. .bluelinks:visited { color:#00F;
  107. text-decoration:underline;
  108. }
  109. .bluelinks:visited { color:#00F;
  110. text-decoration:underline;
  111. }
  112. .bluelinks:hover { text-decoration:underline;
  113. }
  114. a:img{ border:0;
  115. }
  116. a:link{
  117.     color:#000;
  118.     text-decoration:none;
  119.     font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;
  120.     font-size: 18px;
  121. }
  122. a:hover{
  123.     color:#000;
  124.     text-decoration:underline;
  125. }
  126. a:visited{
  127.     color:#000;
  128.     text-decoration: none;
  129. }
  130.  
  131.  
  132. a:active{
  133.     color:#000;
  134.     text-decoration:none;
  135.     text-align: center;
  136. }
  137.  
tom
Sep 23 '10 #1
7 6154
drhowarddrfine
7,435 Recognized Expert Expert
Most elements have a default margin applied to them. I'm not on my dev computer to check but applying 'margin:0' to the paragraphs, divs will probably solve that.
Sep 23 '10 #2
tx9271
12 New Member
my margins are auto for left and right and when i set the top to 0 nothing happens it still stays the same; with a gap. :(
Sep 23 '10 #3
drhowarddrfine
7,435 Recognized Expert Expert
You have margin set to zero on the divs but it's the p element that has margins that are pushing up against the other divs.
Sep 23 '10 #4
tx9271
12 New Member
omg. lol thank you so much. i didnt even think to check that. thanks again
Sep 23 '10 #5
tx9271
12 New Member
i just a new css rule for "p" making it have a margin 0 for all. that should fix the problem for good right?
Sep 23 '10 #6
drhowarddrfine
7,435 Recognized Expert Expert
Yes. Some people set margins on everything to zero and then reset them to what they want. Google for "CSS Reset". The problem is, if they are going to set it to something else anyway, why are they setting it to zero? That's why many don't think it's a good idea.
Sep 23 '10 #7
tx9271
12 New Member
yea i just set all "p" to zero margin because I have margins left and right on auto for a lot of my divs so that wouldn't really work for me. but, i did solve this little problem thanks to you!!

I really appreciate you taking the time to reply to my thread. Hopefully one day I can help people too like how you helped me. Thanks again!
Sep 23 '10 #8

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

Similar topics

8
6679
by: deepak datta | last post by:
Hello Gurus, please help suggest how I can remove the space between the top banner image & the rest of the page in: http://www.naturerugs.com/affiliate/default.asp I have tried numerous things, but nothing workd. I am not sure how that space was created there in the first place. Thanks a ton. Deepak
6
12162
by: Tony T | last post by:
Can anyone help me with this - it may be obvious, but I just can't see it. I'm working with PC and WinME. In IE6, the two divs inside the wrapping div have no space between them, which is how I want it to be, but in NN6.2 and Opera7.11 there's a gap between them. I've tried all the fixes I can think of, but can't get it to work. Any help would be much appreciated. Pared-down example: http://www.tonyturton.com/test/styletest.html...
8
25626
by: mattbostock | last post by:
URL: http://www.drfunkenstein.net/ Username: ciwas Password: password Hi, I'm having difficulty with getting the header image (top.png, background of div#container) to stay next to div#main - at the moment there's a large gap between the two. The problem is visible in IE and Firefox.
2
2653
by: D. Alvarado | last post by:
Hello I have 5 divs, and initially the lower 4 are hidden. I would like everything beneath the 5th div to appear flush against the first visible div. But right now, there is a gap of white space between the first visible div, and everything beneath the 5th. Here is this code: <form name="f"> <div id="Item0">Item 1:<input type="text" size="32" maxlength="32" name="Name0" id="Name0"></div>
1
12126
by: tabert | last post by:
I want to use JavaScript when a button is clicked to show and hide a SPAN or DIV. This works in both IE and Netscape, but what I'd like to happen is for there to be no white space where the hidden div is. I start with two visible divs and in between them are two more hidden ones...in Firefox this works fine--the two visible ones are right next to each other, the button fires the script and the other div shows up in the middle. Another...
3
2161
by: Jordan S | last post by:
I have been using the old HTML unordered list in order to have bullet-point lists. But they don't look good because there is no white space between each list item. <UL> <LI>List Item Here etc... How can I get a bullet-point list but also have white space between each item, control indentation of the list, etc?
5
1938
by: dw | last post by:
hello - first, let me state that i am an Asp.Net rookie. here is the situation: i have a page that looks good in the vs.net designer, but when the page renders there are extra amounts (vertically) of space between controls. i have all of the controls in a table, to help line them up, and I have reviewed the html to verify that there are no extra spaces or paragraphs or breaks between the controls. however, when i run the web site,...
8
15019
by: maroger | last post by:
I'm sure this is a common issue, but I haven't come across anything that works for me thusfar. I am trying to fix my header, which works fine in firefox but has extra space in IE. Here are example html and css files that illustrate my problem: http://torch.cs.dal.ca/~mroger/css/ietest.html http://torch.cs.dal.ca/~mroger/css/styles.css I would like to get both browsers to display the page as firefox does. That is, with no space...
3
3590
by: Veerle | last post by:
Hi, I have a list: <ul> <li>Li 1 - blablablablabla</div> <li>Li 2 - blablablablabla</div> <li>Li 3 - blablablablabla</div> <li>Li 4 - blablablablabla</div> <li>Li 5 - blablablablabla</div> </ul>
8
7218
by: removeps-groups | last post by:
Is there any way to control the space between top of browser or frame and document body? What I have is this: There is a simple file test1.html, and file test.html that displays test1.html in an iframe. On the iframe I set marginheight and marginwidth to zero. But there is one line of blank space between the top border of the iframe and the first line of text. However, the iframe's content document's body's offsetHeight gives the...
0
9799
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
11172
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
10770
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
10871
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
10427
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
9592
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
7139
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();...
0
5808
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4627
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

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.