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

Having trouble with displaying these div's

290 100+
Hi,

I am having difficulty seeing why my divs will not swap places :confused:

I want to swap the positions of the "Hot News" and the "Todays Bonuese" sections.

Here is how they look now:



And when I try and swap the positions I get this:



This is my code:

Expand|Select|Wrap|Line Numbers
  1. <div class="wrapper">
  2. <div class="insidewrapper">
  3.  
  4. <div class="out_box hot_news">
  5. <span class="hot02">Hot News</span>
  6. <div class="hot_news03">
  7.  
  8. <---   THIS IS THE FIRST DIV SECTION --->
  9.  
  10. <div class="hot04">
  11. <p><span style="font-size: 14px;color:darkblue; font-weight: bold;">The five part tutorial series has been completed and they are awesome.</span><br>
  12.  <br>
  13. These will help all new experts to quickly get familiar with the powerful facilities that they have at their fingertips.
  14. <br><br>
  15. The tutorials are under the <b>Free Tuition</b> tab.<br>
  16. 1) How to Become a Recognized Expert <br>
  17. 2) How to Upload and Use Your Images<br>
  18. 3) How to Add Stunning Images to Your Articles<br>
  19. 4) How to Build a Great Product Sales Page<br>
  20. 5) How to Link From Your Articles to Your Products<br>
  21. <br>
  22. <br><br>
  23. <span style="font-size: 14px; color:darkblue; font-weight: bold;">Three new tools recently added:</span>
  24. <br><br>
  25. <b>CHAOS Submitter</b> This is a industrial strength program made for the more demanding Webmaster. 
  26. If you're looking for the most unique and targeted visitors, the the CHAOS submitter will help you.  
  27. <br><br>
  28. <b>Competitor Google Tool</b> This tool grphically displays the relationship of a website within Google and Yahoo. Compare your website with the competion and see where to improve.
  29. <br><br>
  30. <b>Banner Creator.</b> Very easy to use. Create your own free banners quickly and easily.  
  31. </p>
  32. </div> <!-- End div:hot04 --> 
  33. </div> <!-- End div:hot03 -->
  34. </div> <!-- End div:out_box hot_news -->
  35.  
  36. <---   THIS IS THE SECOND DIV SECTION --->
  37.  
  38. <div class="out_box hot01">
  39.  <span class="hot02">Join Today Bonuses</span>
  40.   <div class="in_box hot03">
  41.      <div class="hot04">
  42.       <div style="margin: 0 0 0 20px;">
  43.        <a href="/im/index1.php">Become a free member today and pick 
  44.        up these introductory gifts:</a>
  45.           <br><br>
  46.          <a href="/im/index1.php">
  47.           <img alt="link building" src="http://www.expert-world.com/sys_images/TA-box.png" height="75px" width="80px" />
  48.          <img alt="gift (15K)" src="http://www.expert-world.com/sys_images/IMs.png" height="75px" width="80px" />
  49.          <img alt="gift (15K)" src="http://www.expert-world.com/sys_images/tool-kit-box.png" height="75px" width="80px" />
  50.          <img alt="gift (15K)" src="http://www.expert-world.com/sys_images/BCT.jpg" height="75px" width="80px" />
  51.          </a>
  52.          </div>
  53.      </div> <!-- End div:hot04 -->
  54.     </div> <!-- End div:hot03 -->
  55. </div> <!-- End div:hot01 -->
  56.  

The relevant css is:
Expand|Select|Wrap|Line Numbers
  1. .wrapper {
  2.   width: 950px;
  3.     min-height:100%;
  4.   overflow:hidden;
  5.   border: 1px;
  6.   border-style: solid;
  7.   border-right-color: #ccc;
  8.   border-left-color: #ccc;
  9.   border-top-style: none;
  10.   margin: 0px 0px 0px 150px; 
  11.   padding: 0px 0px 0px 0px;
  12.   border-bottom-style: none;
  13.   text-align: center;
  14. }
  15.  
  16. .insidewrapper {
  17.   width: 900px;
  18.   color :#6385AD;
  19.     color :#000;
  20.   margin: 0px auto 0px auto;
  21. }
  22.  
  23. .out_box{  
  24.   float:left;
  25.     text-align: left;
  26.     margin: 0 0 0 10px;
  27.     display:inline;
  28.  }
  29.  
  30. .hot01{
  31.   width:180px;
  32. }
  33.  
  34. .hot02{
  35.   color :#000;
  36.   font-size: 14px; 
  37.   font-weight: bold; 
  38.     text-align: left;
  39.  }
  40.  
  41. .in_box{
  42.   border: 1px;
  43.   border-style: solid;
  44.   border-color: #ccc;
  45.   float:left;
  46.     text-align: left;
  47.     margin: 10px;
  48.  }
  49.  
  50. .hot03{
  51.   width:150px;
  52.     height:390px;
  53.  }
  54.  
  55. .hot04{
  56.   font-size: 12px; 
  57.      margin: 10px;
  58. }
  59.  
  60. .hot_news{
  61.   width:480px;
  62. }
  63.  
  64. .hot_news03{
  65.   width:480px;
  66. }
  67.  
When I try and swap the divs I just take the first div and out it under the second section. Unfortunately, the "Bonus" box slides over to the right, even though it is floated left - I don't see why :o

Would really appreciate you advice.
Oct 9 '09 #1
1 1494
TheServant
1,168 Expert 1GB
I am presuming you do close your wrapper div?

Anyway, I have used this with your stylesheet and it can switch them around no problem. Don't think I changed anything significant.

Expand|Select|Wrap|Line Numbers
  1. <link rel="stylesheet" href="test.css" type="text/css" />
  2. <div class="wrapper"> 
  3.     <div class="insidewrapper"> 
  4.  
  5.     <div class="out_box hot01"> 
  6.         <span class="hot02">Join Today Bonuses</span> 
  7.         <div class="in_box hot03"> 
  8.             <div class="hot04">
  9.                 <p>this is bonus</p>
  10.             </div>
  11.         </div>
  12.     </div>
  13.     <div class="out_box hot_news"> 
  14.         <span class="hot02">Hot News</span> 
  15.         <div class="hot_news03">              
  16.             <div class="hot04">
  17.                 <p>this is news</p>
  18.             </div>
  19.         </div>
  20.     </div>
  21. </div>
I can't see the rest of your page but you should find out what is filling the space between your left column and the bonuses which is pushing the news below. Simply add a background color to each main div to see which one it is and then deal with that one.
Oct 13 '09 #2

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

Similar topics

4
by: Les Juby | last post by:
Can someone please help with a suggestion as to how I can keep the formatting (carriage returns) that the user enters into a memo field and then display that later. I figured I might be able to...
18
by: fishwick | last post by:
I haven't really done any css in quite a while, and am banging my head against the wall trying get the rudimentary layout together of a church website home page to display correctly - I don't want...
5
by: jasonchan | last post by:
How would you set up a counter in javascript that goes from 5 to 0 This is what i have so far and it is not displaying in the div container "counter" for some reason... <!DOCTYPE html PUBLIC...
6
by: fpcreator2000 | last post by:
Hello everyone. I'm having problems with a page I've created that is used to insert data into a database. It uploads two files into two distinct folder, and it takes the filenames and inserts...
0
Screaming Eagle
by: Screaming Eagle | last post by:
Ok, so some associates and I are building a website, and I'm in charge of the design and layout. I've decided to go with a simple navigation bar on top contained in its own div. Under the navigation...
4
by: dmorand | last post by:
I'm having a problem where my submit button isn't floating over to the right inside of the div. It's supposed to be inside of the "test" div, but it's just below it. What am I missing? This is...
1
by: ced69 | last post by:
having trouble getting marquee to work get object required errors tring t <title>This Month at the Chamberlain Civic Center</title> <link href="styles.css" rel="stylesheet"...
1
by: littlealex | last post by:
IE6 not displaying text correctly - IE 7 & Firefox 3 are fine! Need some help with this as fairly new to CSS! In IE6 the text for the following page doesn't display properly - rather than being...
7
by: RichB | last post by:
I am trying to get to grips with the asp.net ajaxcontrol toolkit, and am trying to add a tabbed control to the page. I have no problems within the aspx file, and can dynamically manipulate a...
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: 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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.