如何在这种情况下定位我的评级栏css html?

时间:2015-03-19 20:58:53

标签: html css

请参阅下面的代码并运行它,我想将评级栏放在Effective:旁边,我该怎么办呢。我试图使用float:left,它失败了,因为它将整个fieldset移动到textarea前面的左边。如何将评级栏放在有效的旁边,欣赏。



.rating:not(:checked) > input {
    position:absolute;
    left:-9999px;
    clip:rect(0,0,0,0);
}

#rating_1:not(:checked) > label {
    float:right;
    width:9px;
	padding:0 .1em 0 0;
	border-left:.1em solid #fff;/* make space between content*/
	overflow:hidden;
    white-space:nowrap;
    cursor:pointer;
    font-size:200%;
    line-height:0.9;
    text-shadow:1px 1px #bbb, 2px 2px #666, .1em .1em .2em rgba(0,0,0,.5);
}

#rating_1:not(:checked) > label:before {
    content:'\00a0 \00a0 \00a0 ';
    background-color: #c7c5c5;
    -webkit-border-radius: 1px;
    -moz-border-radius: 1px;
    border-radius: 1px;	
}

#rating_1 > input:checked ~ label:before {
	content:'\00a0 \00a0 \00a0 ';
	background-color: #4bce32;
}

#rating_1:not(:checked) :hover ~ label:before {
content:'\00a0 \00a0 \00a0 ';
background-color: #4bce32;

}

<div class="user_voting" id="faith_voting">
		<span>My faith:</span>		 
		<textarea   maxlength="99" class="expand1-99" id="faith_t"  name="faith_t" placeholder="..."  onfocus="this.placeholder=''" onblur="this.placeholder='...'" ></textarea>
		    <filedset class="rating" id="rating_1">Effective:
		    <input type="radio" id="star5" name="rating" value="5" /><label for="star5" title="Rocks!">5 stars</label>
		    <input type="radio" id="star4" name="rating" value="4" /><label for="star4" title="Pretty good">4 stars</label>
		    <input type="radio" id="star3" name="rating" value="3" /><label for="star3" title="Meh">3 stars</label>
		    <input type="radio" id="star2" name="rating" value="2" /><label for="star2" title="Kinda bad">2 stars</label>
		    <input type="radio" id="star1" name="rating" value="1" /><label for="star1" title="Sucks big time">1 star</label>
		</fieldset>
  </div>
&#13;
&#13;
&#13;

0 个答案:

没有答案