December 27, 201015 yr Hey guys once again I need some help. I cant seem to move div tags where I want them to be. I used this code (i.e #body width: 100px; height: 100px; top: 25px; left: 50px; this is just an example of me using the top and left codes. Are they correct? coz nothing seems to happen to the div it just sits there. Pls help me out guys. Really appreciate it
December 27, 201015 yr I think the problem is your body ID for the div. Because body is the name of the parent element for all your other elements, your CSS is probably confused. Change your ID to bodyContent or whatever, and it should work. And don't forget your curly braces - like this: #bodyContent { width: 100px; height: 100px; top: 25px; left: 50px; }
December 27, 201015 yr Hey guys once again I need some help. I cant seem to move div tags where I want them to be. I used this code (i.e #body width: 100px; height: 100px; top: 25px; left: 50px; this is just an example of me using the top and left codes. Are they correct? coz nothing seems to happen to the div it just sits there. Pls help me out guys. Really appreciate it Use position:absolute; in above styles.
December 27, 201015 yr Author Yeh I knw about the curly brackets I was just doing a demo to show how I use top and left I will try it out and let u guys knw the result Edit I tried it but no luck: code if wat I have in css it this #bodycontent { position: absolute; height: 100px; width: 100px; top: 25px; left: 50px; } It still sits there :/ Edited December 27, 201015 yr by DirtyLilFreak
December 27, 201015 yr Author Sorry I dont have a link at the moment. What I meant by Sitting there is the div box is where I already added it to. on the left handside top corner. It doesnt move when I add top and left to the css.
December 27, 201015 yr instead of left and top, try margins. #bodycontent { height: 100px; width: 100px; margin: 25px 0 0 50px; }
Create an account or sign in to comment