473,791 Members | 2,853 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Can you underline a button in Firefox without quirks mode?

2 New Member
Consider this code:

Expand|Select|Wrap|Line Numbers
  1. <input type="button" value="u" style="text-decoration: underline;" />
With a complete doctype definition, Firefox will not render the underline, but IE will. With an incomplete doctype definition, Firefox renders the page in quirks mode, and the underline is rendered. I want the underline to render, but I don't want the page to load in quirks mode. Is there a way to make this happen?
Oct 2 '07 #1
3 7220
drhowarddrfine
7,435 Recognized Expert Expert
What you are doing with that markup is actually trying to underline a value or property of the element, somethingi CSS doesn't do. The fact that it happens at all is just a matter of luck. You might look into 'button' since it's more flexible but I couldn't get 'underline' to work there either.

Most browsers are different on what they allow for styling in forms. You can frequently style the borders the text is in, and the colors or fonts, but little else.
Oct 2 '07 #2
DiMono
2 New Member
Actually, someone on another forum found a solution. For some reason (we honestly don't know why), if you apply any of the following (or some variants of them) to a button:

Expand|Select|Wrap|Line Numbers
  1. position: absolute;
  2. display: block;
  3. float: left;
the underline shows up. So my solution was to reverse the order of my buttons, float them all to the right, and now the underline shows up. I've updated this page with one of them, and you can see it works.

Any idea why this works?
Oct 2 '07 #3
drhowarddrfine
7,435 Recognized Expert Expert
There are many things that will work if you apply them but that doesn't mean they're standard or reliable. And this may be just one of those things.
Oct 2 '07 #4

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

Similar topics

2
3686
by: Csaba2000 | last post by:
How can I dynamically resize a button in Opera? The following code works for both IE 5.5 and NN 6.1, but Opera 7.01 is not budging. Any ideas? Thanks, Csaba Gabor from New York <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML>
5
28860
by: Gustaf Liljegren | last post by:
I use to trust Firefox, but in this case, I don't know what to think. My test page: http://gusgus.cn/test/index.html IE6 does the right thing. The containting <div> is 600px, and within it, there's one <div> of 400px and another of 200px, laying side by side. The right <div> has padding on the left and right, to add some space within the box, but Firefox (0.9.2) seem to confuse paddings as margins. Here's the right <div> in my CSS:
5
6599
by: aznFETISH | last post by:
I have had this on a page for a long time <span style="text-align:left;text-indent: 0em;line-height:12pt;font-family: futura, helvetica, arial, sans-serif;font-weight: normal;font-size: 10pt;color:black;background-color:#F0F0F0;border-width:thin;border-style:dotted;border-color:#808080;width: 325px;padding:10px;"><font size="5" face="Verdana, Arial, Helvetica, sans-serif" color="#333333"> content here </font></SPAN> It won't work in...
8
6874
by: lkrubner | last post by:
Am I wrong, or do paragraphs have extra space on top in FireFox, when compared to Microsoft IE. The top of this page is an example: http://www.publicdomainsoftware.org/index.php?pageId=299 The text in the box at top looks like it has an extra 10 or 20 pixels of padding at the top, when FireFox is compared to IE. Why is that?
14
2327
by: expertware | last post by:
Ok! to avoid confusion I will start a new argument. Thanks!! FIREFOX 1.0.7 AND IE6 viewed through DATATIME: a summary REPORT =============================================================== by Pamela Datatime Team -----------------
10
9270
by: Chris Sharman | last post by:
See http://services.ccagroup.co.uk/testlink.html It's valid html 4.01 transitional. It contains 6 links: A1-A3, and B1-B3. A is with no (default) style, B has "a img.nound { text-decoration: none; border: none; }". Link 1 is image + text - this has the problem - why is the image underlined ? How do I fix it ? Link 2 is just image - this is fine. Link 3 is just text - also fine.
17
9682
by: Eric | last post by:
I'm new to JavaScript and I wrote this code to play with. Oddly, if I enter text in a box and then press the button, I only get the onChange event for the text box and not the button's onclick event. But if I press the button without entering text first, the button click event does work. What's up? <html> <body> <h3>Events on Buttons and Text Boxes</h3>
18
25007
by: Diogenes | last post by:
Hi All; I, like others, have been frustrated with designing forms that look and flow the same in both IE and Firefox. They simply did not scale the same. I have discovered, to my chagrin, that IE7 does not seem to offer any way to control the font size of a text input element.
9
1997
by: =?Utf-8?B?Sm9obiBCYWlsZXk=?= | last post by:
I have a ASP .Net page that allows moving around items on the page through javascript. This page works fine in IE. In FireFox however, I have found that if the page is using XHTML 1.0 Transitional as the doctype, you cannot set the style.left and style.top properties of image or div tags. If you remove the doctype from the page it works just fine, although I would rather not do this. You can work around this by setting the cssText...
0
9515
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
10207
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...
1
10154
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
9993
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...
0
6776
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5430
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
5558
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3713
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2913
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.