0

I have problem with move a div to top.
This is my code.

<div id = "berita"> 
    <p> Belakangan ini cherry belle membuat lagu yang versi rock. . . . . </p>
</div>
<div id = "komen"> 
    Nama : <input name="nama" type="text"> 
    Email : <input name="email" type="text">
    No. HP : <input name="no_hp" type="text">
</div>

I want to move div with id komen to top of berita.
I don't want to move komen with make komen relative position. Because there's a reason.
If I move with set value of margin-top. The appearance will broken.
What must I do ?

Edited by andika.kurniawan.121

2
Contributors
1
Reply
12
Views
4 Years
Discussion Span
Last Post by //Gonz
0

change the order of the elements in the html like this:

<div id = "komen"> 
    Nama : <input name="nama" type="text"> 
    Email : <input name="email" type="text">
    No. HP : <input name="no_hp" type="text">
</div>
<div id = "berita"> 
    <p> Belakangan ini cherry belle membuat lagu yang versi rock. . . . . </p>
</div>

this should work unless either of them have absolute positioning

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.