Reputation: 511
My problem Is I Want To Grow My Div Height Top Side With Out Using Position:absolute;
<html>
<head>
<style>
.StartMenu{}
</style>
</head>
<body>
<div class="StartMenu">
<div class="item" ></div>
</div>
</body>
</html>
Upvotes: 0
Views: 312
Reputation: 59
use padding if you want space inside Div. use margin if you want your div to be moved.
<html>
<head>
<style>
.mydiv{
padding-top:30px; // all elements inside div will move 30px down.
margin-top:20px; // your div will move 20px down from parent tag.
}
</style>
</head>
<body>
<div class="mydiv">
<div class="item" ></div>
</div>
</body>
Upvotes: 0
Reputation: 393
On the other way, padding-top
can do what you want.
https://jsfiddle.net/a8ff1fg8/
Upvotes: 1
Reputation: 19341
I think you need like:
.StartMenu{
height: 100px;
border:1px solid;
margin-top:-50px;
}
<div class="StartMenu">
<div class="item" ></div>
</div>
Hope it helps.
Upvotes: 1