HTML - Firefox Adds Left Padding To Button
I have a BUTTON element in which I am placing and image. It looks fine in IE, but firefox is adding some extra left padding to it. Setting margin and padding to the img does not help. Anyone know of a workaround?
See the page at http://newsite.mortgageisrael.com/sh....asp?pageid=18 (2 places) HTML: Code: <button type="submit" class="formButton" style="width:77px"><img src="images/submit.gif" alt="Submit"/></button> CSS: Code: .formButton{ font-weight: bold; margin-top: 10px; cursor: pointer; height:25px; border:1px solid black; padding: 0px; text-align:center; } .formButton IMG{ padding: 0px; margin: 0px; } Thanks Similar TutorialsHeya, This is my first post on the forums =] I just wanted to ask if anyone knew a code that produced a clickable button on your website that when clicked by a website visiter raises the number of a visable counter by 1? And, if possible one that could only be pressed once by the same IP address or Computer. I hope this is clear enough =] I don't mean a site counter that raises the number everytime someone comes onto the site. My apologies if this belongs in a different forum. I'm creating an order form for a site and I need to add something I've never done before. I want content to be added to the form if the user clicks on a certain radio button. At the bottom of the form there are fields for the subtotal and total of the items that they're inputting at the top of the form. By clicking on a radio button I want to do either of the following. 1) A new table cell appears with text and an input field that has a number already in it. 2) The above cell and content are already on the page, and the clicking of the radio button only adds the info into the empty input. The first option I assume is a little more complicated and probably deals with CSS and/or Javascript. Option 1 is preferred but if I can only do number 2 then I'll deal. Just a note, I'm not doing any actual number calculations with this form. It's just raw numbers so there's no need to take that into consideration. Any and all help will be greatly appreciated. I i open this code in FF i get some padding on the left side of the image which is ok, but when i open it in IE i don't get this padding. Is there any way that I have this padding in IE? thanks Code: <div align="justify"><img src="http://www.site.com/default1.gif" style="padding-left:27px;" alt="Cleveland" align="right" width="152" height="136" border="0" /> <p> Ticketchest.com is the Number One provider of Major League Baseball tickets in the United States. You came to the right place for great Cleveland Indians tickets -- close to the field or anywhere you desire. Ticketchest.com has a huge supply of great tickets to sold-out or hard-to-get Cleveland Indians baseball games. <br> </p> <p>Whether you need group tickets for a professional or corporate outing or just a pair of tickets, The Ticket Chest is your source for the best Cleveland Indians baseball tickets on demand. Also, check into our other Major League Baseball teams. We do the hard work so you can focus on eating peanuts. <br> </p> </div> my problem is ie and its padding, ie has add a 4px padding at the bottom of the of the image but in safari and firefox there is no padding. here is the url so u understand what i mean http://nathanoconnor.co.uk/gilbertelectrical/site/ Greetings from Norway! This is my first post on this forum! I am currently developing my website, and when I checked the page in Firefox, Safari and Chrome it seemed perfectly fine, but when loading it in IE and Opera it looked strange. the page: http://aksjefinans.com/bilde.html In Opera and IE the text in the tables are centered while in the other browsers it is aligned to the left (this is how it should look). Why is the table text centered in IE and Opera? I have looked over my code several times and tried a lot of different moves, but it always ends up like this in IE and Opera. Centered text does not look any good. What should I do to make the page look the same in IE as in firefox? Hope someone could help me! For some strange reason if I want to have an ad or image on the left of my text article usually i put a div code around whatever it is like.. Code: <div style="DISPLAY: block; FLOAT: left; MARGIN: 0px 10px 0px 0px"> </div> This works GREAT in firefox but then i was shocked when i went over to Internet explorer and tested my site there using the latest browser.. it doesnt acknowledge that code and so the ad or the image ends up being above my article instead of nicely on the left and the text wrapped around it on the right like you see in firefox Any ideas how to get around this? Maybe a fix that works for ie. and firefox? thank you guys and gals in advance Hi-- I have this button in a HTML/PHP contact form: <input type="submit" value="Submit" /> Preceded by this script in the Head: <script type="text/javascript"> $(function(){ $('#contact-form').submit(function(e){ e.preventDefault(); var form = $(this); var post_url = form.attr('action'); var post_data = form.serialize(); $('#loader', form).html('<img src="loader.gif" /> Please Wait...'); $.ajax({ type: 'POST', url: post_url, data: post_data, success: function(msg) { $(form).fadeOut(500, function(){ form.html(msg).fadeIn(); }); } }); }); }); </script> That combination works to submit the contact form using a php file called process.php. The problem is, I'd like to make that button into a LINK that does the exact same thing (my site doesn't want a button there). I have tried a javascript link, like so: function submitform() { document.forms["contact-form"].submit(); } </script> Followed by the js link: <a href="javascript: submitform()">Submit This</a> BUT this does not work to submit the form as the button does. Is there any way to do this? Many thanks for any help! I am ready to tear my hair out... Hi there, Using fireFox I get the desired result, but when using IE I get the image on the *left* side?! this is my code (the header is a jsp page that has an image and user's info name and last logged in)) <td width="90%" valign="top" align="right"> <tiles:insert attribute='header'/> </td> as you can see the image (header) is align to the right, but IE pushes it to the left (I wrote center - and it still keeps on pushing it to the left) any idea why?? Hi, I'm currently trying to get a submit (post) button to open the target page In a background tab in firefox, i.e. not auto switching to the new tab. I have heard something about firefox not supporting "focus ()" (at least i think thats it, im kind of a newb) due to security reasons, so is there any way around this at all? Thanks, Dani HI is there any way to disable the maximise button in mozilla firefox. I use this code and this is able to disable the maximsie button in IE but not in mozilla. Code: <SCRIPT LANGUAGE="JavaScript"> function popUp(URL) { day = new Date(); id = day.getTime(); eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=200,height=200,left = 540,top = 412');"); } </script> <body> <form> <input type=button value="Open the Popup Window" onClick="javascript:popUp('testme.html')"> </form> <body> For complicated reasons having to do with getting some Javascript to submit a form properly, which I won't get into here, I need to create a "do nothing" input button, whose mere presence lets the Javascript function work. Since this button does not do anything when you press it, I want it to be invisible. In IE I can get it to be invisible just by setting its width to zero using the line below. However, Firefox insists on giving it some finite width, even if there is no label on it (see below). How do I create a zero width button in Firefox - and is there any other way to hide input buttons? <input type="submit" name="control" value=" " style="width: 0px" title="No function" /> i have written a simple html form code the problem is that this code is working fine when run in interner explorer, if i run in mozilla firefox form reset button work as submit button it show submit validation code when reset button press, can any one help me here is the code <script type="text/javascript"> function validation() { alert("submit buton has pressed"); return true; } </script> <body> <form id="form1" name="form_feedback" method="post" onsubmit="return validation();"> <table width="488" border="0"> <!--DWLayoutTable--> <tr> <td width="85"><span>Name:</span></td> <td width="393"><input name="txt_name" type="text" id="textfield2" size="35" /></td> </tr> <tr> <td><span>Email:</span></td> <td><input name="txt_email" type="text" id="textfield3" size="35" /></td> </tr> <tr> <td><span>Address:</span></td> <td height="0"><label> <textarea name="txt_address" id="textarea" cols="45" rows="2"></textarea> </label></td> </tr> <tr> <td><span>Phone No:</span></td> <td height="0"><input name="txt_phoneno" type="text" id="textfield4" size="20" onkeypress="return numeralsOnly(event)" /></td> </tr> <tr> <td><span>Comments For:</span></td> <td height="0"><input name="txt_commentsfor" type="text" id="textfield5" size="20" /></td> </tr> <tr> <td><span>Comments:</span></td> <td height="0"><label> <textarea name="txt_comments" id="textarea2" cols="45" rows="5"></textarea> </label></td> </tr> <tr> <td height="0"><label> <input type="submit" name="btn_submit" value="Submit"/> <input type="reset" value="Reset" name="btn_reset"/> </label></td> </tr> </table> </form> </body> I am creating a website that has a search button with an image. I would like to know if there is some simple code that I can include that would display the same basic image with a different color when the user mouses over the button. Here is the code: <FORM name="searchform" onSubmit="return validateSearch();" METHOD="POST" ACTION="search_results_lt.asp"> <INPUT TYPE="text" NAME="Search" VALUE="" SIZE="20" > <INPUT TYPE=IMAGE SRC="images/search_button.gif" Name="SearchButton" Value="Submit"> </FORM> **** Thanks for your help, Robin Hi all, Does anyone have other techniques to mock a padding in IE. I think the new IE ver8+ have padding, but i don't think IE ver6-7 have it. I did not realize it becuase i would always expect my clients to update thier browsers. I also see that there are still a HUGE percentage of people across the world that is still using IE 6. One trick that i use is to create two div for example: HTML Code: <div> <div style="margin: 10px;"> content </div> </div> this mocks a padding type hope anyone finds this useful I run a forum with a small progress bar under the user's avatar showing how far until the user achieves the next rank. The progress bar is simply an image resized based on the % of current posts to posts needed for the next rank. The styling of the progress bar is done entirely inline. <dd style="padding-left:5px; padding-top:2px;"> <div style="text-align:left; display:block; height:3px; width:80px; border:1px solid #DACDA5;"> <div style="height:3px; width:{postrow.RANK_LEVEL_SIZE}px; background: url('images/progress.jpg') no-repeat;"></div> </div> </dd> In Firefox and later versions of IE, the progress bar renders perfectly: In IE6 however, the bar is oversized and the padding is clearly off: Any suggestions on how I might correct the padding for IE6 would be greatly appreciated. I was going to create a seperate set of code showing the progress bar bracketed by <!--[If IE]> <![endif]-->. Website is Here Ok, so I'm trying to get the text near the picture with the old guy with the roses padded a little. I tried adding "padding: 2px;" to the css but that doesnt work...Can someone look at my css and figure it out? Im stuck! -Thanks Hey guys, I want a kind of horizontal border down the side of my comment div, and padding that pushes it away from it. So far, it's worked perfectly in Firefox and Opera, but it goes all haywire in IE. I honestly don't even know what's going on. Here's an example page with the comments: http://automata.firephoenixnet.com/item/85 It looks okay in Firefox, but it looks all weird in IE. Can someone tell me what's causing this? Hello htmlforums and members, i am having trouble with spacing my text away from my image... Problem: -------------------------------------------------- as you all can see from my picture the text is to close to the image even though i have checked my css and html i cant find the problem line css: PHP Code: #small-content { float:left; width:150px; height:372px; padding:12px 0 0 0; margin:18px 0 0 34px; } #box1 { height:124px; padding:38px 5px 0 5px; margin-bottom:22px; font-size:0.6em; line-height:1.0em; overflow:auto; html: PHP Code: <div id="small-content"> <div id="box1"> <a id="link" href="http://betyoulikeit.com/viewtopic.php?f=84&t=19"> <img style="float: left; padding: 3px 3px 0px 3px;" src="http://i713.photobucket.com/albums/ww140/daveedking/moviezsmall.png" width="25" height="25" /> </a> <p> http://Betyoulikeit.com is on a mission to obtain only the best clean, virus Free Data From around the World... We Do not Host the Data But WE Track Down and Run Security scans on all Files... ___________________________ -Upgrading Everyday- </p> </div> help me find the errors of my ways jajajaja.... -tikki- |