473,387 Members | 1,899 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 floats

219 100+
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 1238
drhowarddrfine
7,435 Expert 4TB
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 "overflowing" out of the div, add 'overflow:auto' to the containing div.
Oct 5 '07 #2
dmorand
219 100+
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 "overflowing" 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 Expert 4TB
I already showed you.
Oct 6 '07 #4
dmorand
219 100+
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
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...
2
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 ...."...
4
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...
8
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 -...
7
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,...
6
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 =...
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: 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",...
16
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...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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,...

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.