/    Sign up×
Community /Pin to ProfileBookmark

adj sibling selector, style rule crossed out in F-Bug

Hi,
Was trying to use an adjacent sibling selector to nudge a radio button (they appear at the top right of the page).
But when looking at my style rule in Firebug I see there is a strikethru through the rule.
What is overriding my style rule? Makes me think i don’t understand inheritance(?).

the code is simply

#first + input {border:1px solid #00f}
or i tried

#first + .radio-btn {border:1px solid #00f}

Here is a link, thanks!

[URL=”http://www.tomcarden.net/mockup/index.html”]http://www.tomcarden.net/mockup/index.html[/URL]

to post a comment
CSS

4 Comments(s)

Copy linkTweet thisAlerts:
@aj_nscFeb 28.2011 — If it's crossed out and grey, that means that rule has already been applied to that element but has been overwritten by a more specific selector.

EDIT: Looks like you must've already solved it.
Copy linkTweet thisAlerts:
@toptomatoauthorFeb 28.2011 — i removed the class .radio-btn and replaced the css with

#first + input, but did not work.

how can i be more specific without assigning it an id?,


which i'm trying to avoid?

the second radio should have a blue border around it for the sake of troubleshooting,

http://www.tomcarden.net/mockup/index.html
Copy linkTweet thisAlerts:
@aj_nscFeb 28.2011 — I see this in the inspector:

<i>
</i>#first+input { border: 1px solid lime; }


No grey line no nothing. Of course the border doesn't get applied to a radio button, but that doesn't mean to say that the rule isn't getting applied.

EDIT: Never noticed it in firebug myself, but you're probably seeing it because the radio input doesn't accept a border style in most modern browsers:

http://www.456bereastreet.com/lab/form_controls/radio_buttons/
Copy linkTweet thisAlerts:
@toptomatoauthorFeb 28.2011 — thats weird because i see it as marked out in the inspector and

why is it saying the color is lime?!?!

and yeah, makes sense browsers may not put a border on a radio button, thanks

thanks for your help.

hey i think i did a tut once o columns and floats and your site, 465 berea street ;-)
×

Success!

Help @toptomato 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.28,
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,
)...