html布局问题

html-css020

html布局问题,第1张

<code><form action="9in8.php" method="post"> <div><label>权限组名称</label> <input style="width:400px" type="text" name="title" id="inputString" autocomplete="off" onkeyup="lookup(this.value)" onblur="fill()"/> </div> <div class="suggestionsBox" id="suggestions"> <div class="suggestionList" id="autoSuggestionsList"> <li onClick="fill(\''所以'\')">所以我想知道这里到底能装多少字</li> </div> </div> <button type="submit" class="btn btn-primary" data-toggle="modal">提交 </button></form></code>css:<code> .suggestionsBox { position: relative left: 272px margin-top: -2px } .suggestionList { width:290px margin: 0px padding: 0px } .suggestionList li { width:280px margin: 0px padding: 0px cursor: pointer list-style-type: nonetext-align: left } .suggestionList li:hover { background-color: #659CD8 } </code>

把text-align:right改成text-align:left

如下代码,如有疑问可以追问

<!DOCTYPE html>

<html>

<head>

<meta http-equiv="Content-Type" content="text/html charset=utf8" />

<title>demo</title>

<style type="text/css">

body {

margin: 0

}

#div1 {

height: 250px

background: #7FFF00

}

#div2 {

height:300px

width:300px

float:left

background: #808080

}

#div3 {

height:300px

width:300px

float:left

background: #1E90FF

}

#div4 {

height:300px

width:300px

float:left

background: #A3CDFF

}

#div5 {

height: 250px

background: #00FFFF

clear: both

}

</style>

</head>

<body>

<div id="div1">div1</div>

<div id="div2">div2</div>

<div id="div3">div3</div>

<div id="div4">div4</div>

<div id="div5">div5</div>

</body>

</html>