I have a div in my html page which holds 3 radio buttons:
<html>
<head>
<link href="CSS/mystyle.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<body>
<div id="outside">
<div id="inside">
<input type="radio"> apple
<input type="radio"> orange
<input type="radio"> banana
</div>
<div id="others"></div>
</div>
</body>
</html>
My CSS is located under CSS directory,
CSS/mystyle.css:
#inside{
font-size:12px;
border-color:#ff3366;
width: 300px;
height: 50px;
}
The width, height and font-size are set successfully, but the border-color:#ff3366; does not shows, why? Why I am failed to set the border color for the div ?
——————– MORE ———————
By the way, how to locate my inner div (with id=”inside”) to the right hand side of the outside div, with about 100px margin to the right most border of outside div?
You need to set a
border-style. Live example: http://jsfiddle.net/tw16/qRMuQ/This can also be written in the shorthand:
UPDATE: To move
#insideto the right you need tofloat:rightthen add amargin-right: 100px. Live example: http://jsfiddle.net/tw16/qRMuQ/