473,770 Members | 1,953 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Having trouble with floats

219 New Member
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.

Expand|Select|Wrap|Line Numbers
  1. <div id="mainT">
  2.     <div id="test">
  3.         <h4>Enter New Values and Submit</h4>
  4.             <label>ID: </label>#URL.system#
  5.             <input class="submitT" type="Submit" value="Submit">
  6.     </div>
  7. </div>
  8.  
Expand|Select|Wrap|Line Numbers
  1. div#mainT{
  2.    border:1px solid #CCC;
  3.     margin-bottom:25px;
  4.     width:600px;
  5.     padding:10px;
  6.     font-size:10px;
  7.      color:#000;
  8.     background-color:#EEE;
  9. }
  10. div#mainT input.submitT{
  11.     /*margin:0 0 0 15px;*/
  12.     float:right;
  13. }
  14. div#mainT label{
  15.     width:120px;
  16.     float:left;
  17.     /*margin:0 0 0 15px;*/
  18. }
  19. div#test{
  20.     border:1px solid red;
  21. }
  22.  
Oct 5 '07 #1
4 1249
drhowarddrfine
7,435 Recognized Expert Expert
And it should not. Parent elements are never to expand to contain floated elements. (IE will but this is a bug in IE). to get the parent to contain the content "overflowin g" out of the div, add 'overflow:auto' to the containing div.
Oct 5 '07 #2
dmorand
219 New Member
And it should not. Parent elements are never to expand to contain floated elements. (IE will but this is a bug in IE). to get the parent to contain the content "overflowin g" out of the div, add 'overflow:auto' to the containing div.
What would be the alternative to get this to work? I was under the impression that the parent element would expand, damn.
Oct 6 '07 #3
drhowarddrfine
7,435 Recognized Expert Expert
I already showed you.
Oct 6 '07 #4
dmorand
219 New Member
I already showed you.
Ok, I just wasn't sure if there was a different way I should be doing this rather than using floats. Thanks though!
Oct 6 '07 #5

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

Similar topics

9
4964
by: Penn Markham | last post by:
Hello all, I am writing a script where I need to use the system() function to call htpasswd. I can do this just fine on the command line...works great (see attached file, test.php). When my webserver runs that part of the script (see attached file, snippet.php), though, it doesn't go through. I don't get an error message or anything...it just returns a "1" (whereas it should return a "0") as far as I can tell. I have read the PHP...
2
1728
by: Firas D. | last post by:
On the page: http://firasd.org/temp/faq.html How would I make the picture contain itself in the first grey <div>? Basically, nudge it up and make the "This FAQ is compiled voluntarily ...." text wrap to its left? In case someone wants to see the structure visually: http://firasd.org/temp/outlined.gif
4
1797
by: Matthew | last post by:
http://www.osbornewood.com/products.cfm?type=Island_Legs&tables=false The content of this page is pushed down below the bottom of the content of the sidebar in IE 6. Mozilla and Netscape have no trouble with it. Any ideas what the problem is? Matthew
8
2498
by: Tom | last post by:
Has anyone ever seen a IComparer for floats the returns magnitude. i.e. instead of returning -1, it would return -5. To let you know HOW different the two numbers are. obviously for int it is a - b. But for float the results would have to be normalize some how to a 32bit range. I understand there would be percision errors. Thanks Tom
7
4221
by: laclac01 | last post by:
So I am converting some matlab code to C++. I am stuck at one part of the code. The matlab code uses fread() to read in to a vector a file. It's a binary file. The vector is made up of floats, which in matlab is 32 bits. How do I get this binary file in to floats in c++? I try reading the file using the ifstream>>myFloat. But nothing ever goes in to the float. So the closest I have come is having 4 unsigned char store the binary data....
6
1396
by: Justin | last post by:
I am trying to add dollar amounts together and add sales tax but everthing after the decimal point is being cut off in the dollar amounts. Here is my code: if (Adults != "") { AdultTotal = int.Parse(Adults) * Convert.ToInt32(myReader); ttlAdults.Text = Adults; }
18
2499
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
2050
by: Sanjay Kulkarni | last post by:
I am facing some problems while trying to explore the printf statement: Expected Actual Result Statement Result 1 printf("x = %d", 18.0 / 14); 18725 5.0 printf("\nx = %f", 5); 0.000000 5 printf("\nx = %d", 5.0); 0
16
4134
by: luca bertini | last post by:
Hi, i have strings which look like money values (ie 34.45) is there a way to convert them into float variables? everytime i try I get this error: "numb = float(my_line) ValueError: empty string for float()" " here's the code ************
0
9617
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
10099
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
9904
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
7451
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...
0
5354
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...
0
5481
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4007
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
3607
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2849
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.