我的选择器不起作用

时间:2014-08-18 15:57:13

标签: css

所以我有一个这样的选择器:

.page-admin-settings-banner-image input[type=radio]

这是身体和类:

<body class="not-front logged-in one-sidebar sidebar-left page-admin-settings-banner-image section-admin admin-menu">

这是形式和类:

<form action="/admin/settings/banner-image" accept-charset="UTF-8" method="post" id="banner-image-select">

这是输入按钮(我试图选择此表单中的所有输入按钮,所以我不能选择id,遗憾的是):

<input type="radio" id="edit-banner-image-season-files/banners/banner-summer.jpg" name="banner_image_season" value="files/banners/banner_summer.jpg" checked="checked" class="form-radio">

现在,我试图以多种方式抓住这个特定的输入 - 我已经尝试过.form-radio,我已经尝试过一条路径,但出于某种原因我只能&#39 ;似乎选择它。似乎没有什么能够覆盖我写的CSS - 它似乎根本没有被应用。

为什么这个CSS:

.page-admin-settings-banner-image input[type=radio]{
  float: left;
  margin-top:80px;
}

不工作?

或者这个:

#banner-image-select input[type=radio]{
  float: left;
  margin-top:80px;
}

在我看来,无线电类型的输入是在这两个元素中,它应该选择它。

根据请求表单HTML:

<form action="/admin/settings/banner-image" accept-charset="UTF-8" method="post" id="banner-image-select">
<div><div class="form-item">
 <label>Choose a Season: </label>
 <div class="description">Choose a season for display at the top of the page</div>
 <div class="form-radios"><div class="form-item" id="edit-banner-image-season-files/banners/banner-fall.jpg-wrapper">
 <label class="option" for="edit-banner-image-season-files/banners/banner-fall.jpg"><input type="radio" id="edit-banner-image-season-files/banners/banner-fall.jpg" name="banner_image_season" value="files/banners/banner_fall.jpg" class="form-radio"> <img src="http://domain/files/banners/banner_fall.jpg"></label>
</div>
<div class="form-item" id="edit-banner-image-season-files/banners/banner-spring.jpg-wrapper">
 <label class="option" for="edit-banner-image-season-files/banners/banner-spring.jpg"><input type="radio" id="edit-banner-image-season-files/banners/banner-spring.jpg" name="banner_image_season" value="files/banners/banner_spring.jpg" class="form-radio"> <img src="http://domain/files/banners/banner_spring.jpg"></label>
</div>
<div class="form-item" id="edit-banner-image-season-files/banners/banner-summer.jpg-wrapper">
 <label class="option" for="edit-banner-image-season-files/banners/banner-summer.jpg"><input type="radio" id="edit-banner-image-season-files/banners/banner-summer.jpg" name="banner_image_season" value="files/banners/banner_summer.jpg" checked="checked" class="form-radio"> <img src="http://domain/files/banners/banner_summer.jpg"></label>
</div>
<div class="form-item" id="edit-banner-image-season-files/banners/banner-winter.jpg-wrapper">
 <label class="option" for="edit-banner-image-season-files/banners/banner-winter.jpg"><input type="radio" id="edit-banner-image-season-files/banners/banner-winter.jpg" name="banner_image_season" value="files/banners/banner_winter.jpg" class="form-radio"> <img src="http://domain/files/banners/banner_winter.jpg"></label>
</div>
</div>
</div>
<input type="submit" name="op" id="edit-submit" value="Save" class="form-submit">
<input type="hidden" name="form_build_id" id="form-ed7f4579756fea75b4eae351bacd6cc3" value="form-ed7f4579756fea75b4eae351bacd6cc3">
<input type="hidden" name="form_token" id="edit-banner-image-select-form-token" value="c93ad83537dbd1252d5fc1ef5fcd91aa">
<input type="hidden" name="form_id" id="edit-banner-image-select" value="banner_image_select">

</div></form>

0 个答案:

没有答案