* { margin:0; } .demo { position:fixed; font-size:20px; font-weight:bold; display:inline-block; } .divTop { width:100%; height:5px; background:red; position:fixed; top:0; } .divLeft { width:5px; height:100%; position:fixed; left:0; background:green; }