/    Sign up×
Community /Pin to ProfileBookmark

problem with html buttons in IE8

Hello!

we got html buttons with background images set on our site. This works fine in IE6 / IE7, FF and so on. But in IE8 the button looks really strange.

Here is the html for the button (and label inside the button):

[code=html]
<button id=”ctl00_buttonSearch” class=”btn” type=”submit”>
<span>Search</span>
</button>
[/code]

and here´s the css

[code=html]
div#search-form button.btn {
background:transparent url(../images/sections/search/btn-right.jpg) no-repeat scroll right center;
font-size:1.1em;
}

div#search-form button.btn span {
background:transparent url(../images/sections/search/btn-left.jpg) no-repeat scroll left center;
color:#505050;
font-weight:normal;
height:21px;
line-height:21px;
}

[/code]

Does anyone know what we must do in order to fix this? I´ve tried altering the css but to no avail.

The buttons can be viewed here: [url]http://beta.nordicnet.se/[/url]

to post a comment
CSS

3 Comments(s)

Copy linkTweet thisAlerts:
@CoyotelabJun 12.2009 — add [COLOR="Red"]width: ;[/COLOR]
Copy linkTweet thisAlerts:
@livezauthorJun 12.2009 — to button or label or both? Is that really valid css? I tried, and got this warning:

Missing a property value in the "<property> : <value>" declaration

and problem seemed to remain.
Copy linkTweet thisAlerts:
@CoyotelabJun 13.2009 — [CODE]div#search-form button.btn {
background:transparent url(../images/sections/search/btn-right.jpg) no-repeat scroll right center;
font-size:1.1em;
margin:0 5px 0 0;
width: 21px;
height: 21px;
}[/CODE]
×

Success!

Help @livez 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.5,
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: @Yussuf4331,
tipped: article
amount: 1000 SATS,

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

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...