Hello there,
I´m new to ebook formatting but I understand that having some knowledge of HTML and CSS helps a lot. In my case I am managing ok but I found the Smashwords Style Guide very helpful for formatting your book in the right way in Word or Open Office. If you follow their simple rules your book will look better in epub too.
You can find it on their website
http://www.smashwords.com/