473,581 Members | 2,757 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 1245
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
4944
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...
2
1723
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
1788
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
2472
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
4205
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...
6
1386
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
2480
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...
5
2041
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
4123
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
7876
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...
0
7804
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...
0
8156
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. ...
1
7910
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...
0
8180
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...
0
6563
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...
0
3809
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...
1
2307
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
0
1144
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...

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.