Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6361599
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T23:47:54+00:00 2026-05-24T23:47:54+00:00

input.icon { border: 0; cursor: pointer; margin: 0; padding: 0; width: 16px; height: 16px;

  • 0
input.icon 
{
    border: 0;    
    cursor: pointer;
    margin: 0;
    padding: 0;
    width: 16px;
    height: 16px;
    text-indent: -1000em;
}
input.edit {         
    background: transparent url('/edit.png') no-repeat center top; 
}

On an element like:

<input type="submit" class="icon edit" onclick="...." />

It renders fine in firefox, without the text on the image also. In IE it shows the text of the value attribute.

Why is that?
Actually i’m not even setting the value attribute and it is defaulting to ‘submit query’.

Also, I thought my CSS could be more specific by doing:

input.icon {
...
}
input.icon .edit {
...
}

But that didn’t work for me not sure why, so I changed the 2nd definition too:

input.edit {
..
}

Why didn’t input.icon .edit work?

Could I just as well put these styles on a div element? What’s the difference?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T23:47:54+00:00Added an answer on May 24, 2026 at 11:47 pm

    You’ve got a few questions there. For the first one. I’m not seeing the issue in IE8:

    http://jsfiddle.net/rfYrq/

    I do not see the text in IE8.


    Question 2: “Why didn’t input.icon .edit work?”

    The meaning of input.icon .edit is, any element with the class of edit within an input element with a class of icon. What you really wanted was any input with both the edit and icon classes. That would be like this:

    input.icon.edit


    Question 3: “Could I just as well put these styles on a div element?”

    Yes. If you are overriding the style of the button with your own css and apparently overriding the functionality of the button with an onclick, you can just use a div or a span or some other element depending on your situation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a quick way to create an input text element with an icon
I have one text input and one button (see below). How can I use
I have saved input from a textarea element to a TEXT column in MySQL.
Is transparentize border, background one by one is the only way? Any other method?
The CSS: .flyoutdialog { position: absolute; top:0; left:0; border: 1px solid #CCC; background-color: white;
How do I determine the correct number of textbox (input type=text) in an html
How can I show icon only for rich:calendar component? I needn't any input,just icon.
In the demo it says: Click the icon next to the input field to
I have a text input field on a page, however, I'm finding it difficult
INPUT <logs> <logentry revision=648> <author>nshmyrev</author> <date>2008-09-21T19:43:10.819236Z</date> <paths> <path action=M>/trunk/po/ru.pi</path> </paths> <msg>2008-09-21 Nickolay V. Shmyrev

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.