Hi all... position elements is giving me a hard time here :(
hope you could hlep with with these 2 questions.
- how does inline, inline-block, block affect position?
- consider the code below, how do i vetical and horizontal center the elements inside #contenter.
seems code tag doesnt
<html>
<head>
<title>test</title>
<style type="text/css">
body{
width:500px;
margin:0 auto;
}
#content{
float:left;
clear:both;
width:500px;
height:80px;
margin:auto;
border: 2px dotted red;
}
#first{
float:left;
clear:both;
}
.input_group{
display:inline;
}
.li_element{
display:inline;
list-style:none;
}
.u_list{
margin:0;
padding:0;
}
</style>
</head>
<body>
<div id="first">
<ul class="u_list">
<li class="li_element"> 1 </li>
<li class="li_element"> 2 </li>
<li class="li_element"> 3 </li>
</ul>
</div>
<div id="content">
<img id="img" src="image.jpg"/>
<form class="input_group">
<input type="text"/>
<input type="submit"/>
</form>
</div>
</body>