473,763 Members | 1,908 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Having trouble with displaying these div's

290 Contributor
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 1511
TheServant
1,168 Recognized Expert Top Contributor
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
7319
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 use: 'replace carriage returns with BRs comment=Replace(comment, chr(13), "<br>") but obviously net.! The <pre> tag doesn't sem to help either as the embedded return is
18
2498
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 to continue work until I understand what I'm doing wrong. http://www.christchurchinfo.net The site displays nicely in Firefox/Mozilla and Safari, but the stained glass windows navigation portion is getting pushed down in IE, and the "news"...
5
2114
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 "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled...
6
2179
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 them into a MYSQL database along with other product information. Here is the entire .php file. I list it because the errors are not showing at all, and I need a fresh pair of eyes to look at it. Any answers, critisims (constructive), or other talk...
0
3152
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 bar, I have two iframes contained in one div and each iframe in its own inside the container div. In theory it was supposed to have shown the user statistics to the left at a width of 160 pixels and lowered from the top at 73 pixels. That displays...
4
1249
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 just a test snippet I was working with to get this functionality to work correctly. <div id="mainT"> <div id="test"> <h4>Enter New Values and Submit</h4> <label>ID: </label>#URL.system# <input class="submitT" type="Submit"...
1
2685
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" type="text/css" /> <script src="Dunbarlab9.js" type="text/javascript"></script> <script type="text/javascript">
1
4220
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 aligned to the top, along with the slideshow and link buttons, you have to scroll down to see the text - how can I make IE6 display correctly? http://geekarama.co.uk/new_home.html here is the code for new_home.html and following that the CSS...
7
6669
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 tabcontainer which has 1 panel already, however I want to try create the TabPanels dynamically. I followed the advice here: http://www.asp.net/learn/ajax-videos/video-156.aspx (3rd comment - Joe Stagner)
0
9566
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
9389
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
10149
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
10003
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...
0
9828
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...
1
7370
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
3918
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
3529
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2797
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.