<html>
<head>
<title>Title</title>
<style type="text/css">
#container {
position: relative;
}
#line {
border-bottom: thin solid gray;
display:inline-block;
position:relative;
bottom: 1ex;
width:90%;
}
</style>
</head>
<body>
<div id="container">
<span id="title">Title</span>
<span id="line"></span>
</div>
</body>
</html>
How do i make that the width of span "line" to be equal with the width of "container" minus width of the span "title"?
Edit
The width of the "title" to be decided by the text inside the "title".