January 14, 200917 yr Hi, does anyone know the coding to put flash vertically and horizontally aligned in the centre of a html page please? Using CSS? I've tried: #flash { height: 550px; width: 1000px; margin-right: centre; margin-left: centre; } and it doesn't work.
January 14, 200917 yr Have you tried: body { text-align:center; } #Flash { margin: 0 auto; width: 1000px height: 550px text-align:left; } Give that a whirl and report back
January 14, 200917 yr To align it both vertically and horizontally however: #flash { position:absolute; width:1000px; height:550px; left:50%; top:50%; margin-left:-500px; margin-top:-275px; } That's never failed me. A little breakdown: Because it's across and down 50%, you need to indent it by 50%, hence the negative margin, which is 50% of the width & height .
Create an account or sign in to comment