/    Sign up×
Community /Pin to ProfileBookmark

Strange FireFox behaviour with default value and css

Hi,

I’m seeing some stange behaviour in FireFox when I have a form element nested in a table with a default value, and some CSS applied. Here’s a minimal example:

[CODE]
<style>
.outer {
position: relative;
}

.inner {
position: absolute;
}

</style>

<table>
<tr>
<td>
<div class=”outer”>
<div class=”inner”>
<input value=”foo” name=”textbox” type=”text” size=”40″>
</div>
</div>
</td>
</tr>
</table>
[/CODE]

The default value doesn’t appear in FireFox. But when you start typing the default text appears with whatever you’ve typed in. Adding form tags, body tags, etc. has no affect. Removing the tables *or* the positions fixes it. This doesn’t happen at all in IE6.

Any ideas about what I’m doing wrong?

Ok, so I shouldn’t necessarily be using tables, but I can’t unfortunately change that right now.

to post a comment
CSS

1 Comments(s)

Copy linkTweet thisAlerts:
@MutantauthorOct 03.2006 — Have dug around and found this appears to be a bug:

https://bugzilla.mozilla.org/show_bug.cgi?id=325486

The workaround is to add a min-width to the outer div tag
×

Success!

Help @Mutant spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...