Closed Bug 192670 Opened 22 years ago Closed 22 years ago

incorrect rendering of image with css style with <input type=submit> tag

Categories

(Core :: Layout: Form Controls, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: tommy, Unassigned)

References

()

Details

User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.2b) Gecko/20021029 Phoenix/0.4 Build Identifier: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.2b) Gecko/20021029 Phoenix/0.5 If the css style is aplied to a <input type=submit name "bar" value="foo" class=".del"> tag then in phoenix 0.4/IE5/6(PC) everything is ok. Mozilla 1.3.1 alpha shows the value through the image. Phoenix 0.5/ie5(MAC) show only the value not the image. Reproducible: Always Steps to Reproduce: 1.Make a <input type=submit name="foo" value="bar" class=".del" 2. 3. Actual Results: No image was on the button or the text was shown through the button. Expected Results: Only show the image
1.3b is out and this bug is fixed. Get it. ;) *** This bug has been marked as a duplicate of 171598 ***
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
This is not a diplicate of 171598 as this is about a css with input type=submit in stead of type=image. I downloaded 1.3.1beta and it still has the bug. Please check http://thuis.zwanebloem.nl/test/mozbug.jpg for a screenshot.
Status: RESOLVED → UNCONFIRMED
Resolution: DUPLICATE → ---
Could you point to an HTML page that shows the problem? Figuring out what's going on based on a screeshot, one line of incorrect HTML (class="del", no?) and a CSS file is a little hard...
You're setting the image as a _background_ for the button. Of course the text (which is foreground) is going to be on top of it... Why would you expect anything else? What you're looking for here is <input type="image"> or <button type="submit"> with an <img> tag inside.
Same result for Phoenix nightly and Mozilla nightly from 20030211. In both cases, the image was under the text as expected.
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago22 years ago
Resolution: --- → WORKSFORME
Ok I agree that setting the background image would logically result in the text appearing on top of it. On the other hand Ie 5/6 think otherwise, is that a bug or feature? Isn't there a spec on this?
> is that a bug or feature? It's just a fact of life. > Isn't there a spec on this? No. CSS3 may specify it. Maybe. But in CSS2, internal rendering of form controls is completely up to the user-agent.
If there is no spec why not do the same as IE5/6 is doing. It would safe a lot of webdesigners from this "correct" behaviour?
Because it would be extremely difficult to implement in Mozilla's architecture. And because I suspect the upcoming CSS3 _will_ specify it and will _not_ agree with what IE does.
IE never does anything correctly. IE has caused as many problems for web designers with their proprietary extensions just as NS4 did. It was partly because the standards were still immature, but they aren't anymore. Why shouldn't buttons be allowed to have a graphical background behind the text? You might want to make a gradient background behind the buttons' text. The _correct_ method isn't what IE does, but is what the W3C standards body decides based on their expertise. They put into consideration things like accessibility, text browsers, and portable devices, etc. Unless you can find something in the standards that specifically says that images aren't allowed on buttons behind text, then how can you be sure IE is doing the right thing? IE has a lot of issues with CSS, and you can almost guarantee if Mozilla and IE do things two different ways, IE is doing it incorrectly. Remember that a lot of guys at w3c work on Mozilla, and also IE, then look at the history of who seems to follow the standards better since Mozilla came out. The standards documents are a bit hard to follow and aren't perfect, but as things move along, people will get more used to the standards, and if you spend enough time looking at them, you can figure it out. I could tell you a little story about making dynamic web pages back in 1998 and how frustrating it was having to browser sniff, etc. If you want your page to be viewable on all browsers, don't do bleeding edge things that all browsers don't support. Don't blame us for things that IE doesn't do right. Have you tried what Boris mentioned in comment #5 ?
input type=image cannot be used as mozilla returns the value and IE only returns value.x and value.y since w3c did not define it, at least that is what my book tells me. I thought button was IE only, but it seems to work ok in mozilla, although ie5 gives some odd behaviour.
W3C does define it (though it's not the clearest definition in the world).... the value should be submitted.
You need to log in before you can comment on or make changes to this bug.