Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Re: Button & Input Element

136 views
Skip to first unread message

Arunan Skanthan

unread,
Jun 23, 2011, 2:34:12 AM6/23/11
to CSS Lint
Hi!

1) I have added a class 'error', to inputs, like so...

<input class="error" type="text" /><!-- for simplicity's sake -->

But the when I write my css the style does not get applied when it's
generic...

.error {
background: red;
}

But it DOES when it's specific..!

input[type="text"].error {
background: red; /* THIS WORKS!*/
}

2) The button element has different padding on different browsers...
to fix in IE7 I'm using...

*button {
padding: x y z g;
}

... lint says

Expected LBRACE at line 88, character 2.

Also I've written a generic button class .btn, which works on both
buttons and a-tags... but when I have to add the !important (*argh*)
to the button element in css to get styles to override the .btn
styles.

I hope this was clear?

Could someone help me shed light on what I'm doing wrong.

Arunan Skanthan

unread,
Jun 23, 2011, 2:36:11 AM6/23/11
to CSS Lint
Sorry I meant to say...

Thanks!

Arunan

... at the end. Apologies!
--
@askalot
Website: http://arunanskanthan.com
---
"Ariels in the sky. When you free small mind, you free your life..."

Nicholas Zakas

unread,
Jun 23, 2011, 5:40:08 PM6/23/11
to css-...@googlegroups.com
*button is not a valid selector, which is why it is an error.

-N
Reply all
Reply to author
Forward
0 new messages