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 ?

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.