Tuesday, 6 August 2013

css: is that possible to move texts between divs through css?

css: is that possible to move texts between divs through css?

Html:
<div id="id1">
this is my text1.
</div>
<div id="id2">
this is my text2.
</div>
css:
<style>
#id1 {
margin: 0 auto;
width: 600px;
background-color:#00FFCC;
}
#id2 {
margin: 0 auto;
width: 600px;
background-color:#FFCCCC;
}
</style>
In front, it shows:
this is my text1. (green background)
this is my text2. (pink background)
Now if I want it show like this:
this is my text1. this is my text2.
(green background)
empty in pink background
so if do not change html codes, is that possible to make it happen only
through css? Basically what i want to do is to move text:this is my text2.
to the first div:<div id="id1"></div>

No comments:

Post a Comment