I created the html fieldset
with some textbox inside.
I want to add a close button to the fieldset using only css like this.
Is it possible? If it is, help me please. Here is my jsfiddle
i updated your fiddle http://jsfiddle.net/ukx35/18/
<fieldset style="position:relative">
<legend>Title</legend>
<input type="text"/>
<button style="position: absolute;right:10px;top:-5px;outline:5px solid #fff">
<img src="http://icons.iconarchive.com/icons/hopstarter/sleek-xp-basic/16/Close-2-icon.png"/>
</button>
</fieldset>
use position absolute for the close button and position relative for your fieldset
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.