Soldato
I'm not very good with coding or CSS so I need some help. What i'm trying to do I feel should be simple but it's seemingly not for me. I got some code knocked up (CGPT) and it was working fine until the latest version of Safari came out v16.5.
What I want to do is;
When a Safari Browser is detected to change the CSS style to 'display: block' for an object on my webpage. The reason for this is because the 'flex' condition simply doesn't work properly on Safari that I've read (and seen).
I want it to remain as 'flex' for all other browsers. The behaviour can be observed here after a search is executed on Safari (everything is squashed up after a search);
www.bestcarhire.com/test/
The code is this;
If someone has any ideas or alternatives let me know. I tried a few Java / PHP alternatives too but no luck. It behaves as though it's not detected Safari and runs in flex.
Cheers
What I want to do is;
When a Safari Browser is detected to change the CSS style to 'display: block' for an object on my webpage. The reason for this is because the 'flex' condition simply doesn't work properly on Safari that I've read (and seen).
I want it to remain as 'flex' for all other browsers. The behaviour can be observed here after a search is executed on Safari (everything is squashed up after a search);
www.bestcarhire.com/test/
The code is this;
Code:
/* Styles for the 'webtest' ID in non-Opera and non-Safari browsers */
#webtest {
display: flex;
justify-content: center;
/* Additional styles */
}
/* Exclude display: flex; for Opera and Safari */
@media not all and (-webkit-min-device-pixel-ratio:0) and (min-resolution:.001dpcm),
not all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
#webtest {
display: block;
/* Additional styles for Opera and Safari */
}
}
If someone has any ideas or alternatives let me know. I tried a few Java / PHP alternatives too but no luck. It behaves as though it's not detected Safari and runs in flex.
Cheers