Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Enable and disable button
Message
De
31/10/2013 14:13:36
 
 
Information générale
Forum:
Javascript
Catégorie:
JQuery
Divers
Thread ID:
01586844
Message ID:
01587017
Vues:
22
>>>>Hmm. Just tried all three(i.e aspx.:
<input type="button" id="button1" value="One" />
>>>><button type="button" id="button2">Two</button>
>>>><asp:Button runat="server" ID="button3" Text="Three"/>
gives HTML:
<input type="button" id="button1" value="One">
>>>><button type="button" id="button3">Two</button>
>>>><input type="submit" name="button4" value="Three" id="button4">
in a clean Web Application and they look the same to me. Relevant bit in css:
   input[type="submit"],
>>>>    input[type="button"],
>>>>    button {
>>>>        background-color: #d3dce0;
>>>>        border: 1px solid #787878;
>>>>        cursor: pointer;
>>>>        font-size: 1.2em;
>>>>        font-weight: 600;
>>>>        padding: 7px;
>>>>        margin-right: 8px;
>>>>        width: auto;
>>>>    }
How does yours differ ?
>>>>
>>>
>>>I will try to create a small test page to see if I get the same results as you. When I tested in my "production" project page, the look was very different. As I said, the standard ASP.NET Web Forms project is using Sites.css (from MS). So it (this .css) could be that made the difference.
>>
>>The example above is using standard Sites.css. I can see one difference: for the 'button' element Sites.css doesn't override the margin-bottom, -left or -top values. For and 'input' element it overrides all four. But that shouldn't affect the size of the element itself.......
>>
>
>One other CSS I have is Bootstrap.css. I am working on learning of how to "examine" the resulting HTML so I can see what affects what. For example, I use a Bootstrap class "table table-bordered" but it does not show the left side of the table correctly (that it, no border on the left). So I will use the IE Development Tool or Firefox or Chrome to figure what is in the "way.". I think (for me) to learn how to use this tools is essential since I am up to my neck in web development. And plan to continue this uphill road. Thank you.

Always bear in mind that the base style for any element, unless overridden, is determined by the browsers own 'internal' style sheet and, since this varies between browsers, it's best to have your own base css (ala Sites.css) which should ensure the same appearance across browers. Chrome always shows the browser (user agent) styles in the hierarchy; I don't think IE does this......
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform