MichaelF 0 Posted September 16, 2020 Report Share Posted September 16, 2020 I have a conundrum in this web page: https://allenstown-alt.org/news-analysis/20200812-early-fall-concert.htm I created some CSS styles to overlap and rotate some photos but they result in a big empty space below the photos. I have to use <p style="margin-top: -350px"> to force the following paragraph upward. The top two photos are animated horizontally. The styles for the photos are of the form: .photo1 { position: relative; top: 10px; left: 0px; z-index: 1; transform: rotate(-10deg); } The photos are grouped in a DIV block and each photo references one of the three defined styles (photo1, photo2, photo3). The two animated photos are in separate DIV blocks because they reference the animation code in the HEAD section. Can anyone offer advise as to why the transform: rotate property seems to add so much space after the photos? Quote Link to post Share on other sites
MichaelF 0 Posted September 22, 2020 Author Report Share Posted September 22, 2020 It has been several days since I posted this topic. Does anyone have any advice as to why the transform: rotate property seems to add so much space after the photos on the web page I referenced? Quote Link to post Share on other sites
dsonesuk 913 Posted September 23, 2020 Report Share Posted September 23, 2020 (edited) I think you will find using position relative with top: -350px; causes its height to increase from its relative original position to its relative new position by the value used. Try using position: absolute; within a position; relative container element OR try using transform: translate(), you may need to change doctype though to html5 doctype. Edited September 23, 2020 by dsonesuk Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.