如何填充div而不扩展边框?

Joh*_*ith 8 css border padding

我有这个代码:

<html>
<head>
<style type="text/css">
.container {
    border-bottom: 1px dotted #999999;
    width:500px;
    padding-left:200px
}
</style>
</head>
<body>
<div class="container">asdf</div>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)

它的工作正常,除了底部边框也适用于缩进前的200px.我希望底部边框以200px开始.可以这样做吗?

mar*_*rkt 14

使用保证金而不是填充或使用内部div ..(更新以符合评论中披露的要求)

<html>
<head>
    <style type="text/css">
        .container {            
            width:500px;
            padding-left:200px
        }
        .inner{
            border-bottom: 1px dotted #999999;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="inner">
            asdf</div>
    </div>
</body>
Run Code Online (Sandbox Code Playgroud)

它应该是这样的:http://jsfiddle.net/dKVTb/1/