- This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
Viewing 5 posts - 1 through 5 (of 5 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
My site here: http://pitfarmtennis.co.uk/cms/ fails to center elements properly in some browsers, for example:
Chrome: Works
Safari 8: Doesn’t work
Safari 9: Works
Safari iPad: Doesn’t work
Samsung Galaxy tablet: Doesn’t work
Below are some images of it working and not working – any ideas of why this is please? My understanding was that I has implemented a cross-browser solution for centring, supporting even ie8!
Images: http://1drv.ms/1LPj8be
Here is how I am currently centering items:
.home-section-1 {
height: 600px;
position: relative;
}
.home-section-1-content {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
text-align: center;
@include no_select;
width: 99%;
}
Thanks for your help!
@Shikkediel that is really great, thank you. Does anybody know an ie8 fallback please?
Hi @Beverleyh thanks for the reply – much appreciated. Sadly however the site features many elements with heights and widths as %s – which I guess this wouldn’t work for.
Many thanks for you help.
Thanks for the reply @Shikkediel – I like that example. Anything for relatively positioned elements please (that is cross browser inc. ie8?)
Many thanks
That’s great info thanks very much guys :))