Working on my very first webpage using just HTML and CSS has been an interesting experience.
After creating the first 2 pages and checking in Chrome and IE, I decided to test in Firefox and Safari. To my surprise, Safari rendered my CSS differently than expected, requiring a few tweaks.
The part I'm struggling with the most is the navigation and header section. Here is the HTML snippet for that:
<div id="logo"> <img src="images/logo no name.jpg" style="width: 50px"> </div>
<div id="jlc"> James Lucas Coaching </div>
<div id="menu"> <nav>
<ul>
<li class="here">Home</li>
<li class ="coming"><span title="Coming soon!"><a>The Coach</a></li>
<li class="coming"><span title="Coming soon!"><a>The Process</a></li>
<li class="coming"><span title="Coming soon!"><a>Packages</a></li>
<li><a href="Ccontact.html">Contact</a></li>
</ul>
</nav> </div>
</div>
And here is the corresponding CSS:
#top {
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
-ms-grid-row-align: center;
align-items: center;
min-width: 688px;
height: 10%;
padding-left: 1%;}
#logo {
padding-top: 2%;
margin-top: none;
width: 100%;
min-width: 45px;
-webkit-box-align: center;}
#jlc {
font-family:'Amatic SC', cursive;
font-size: 6.5vh;
color: #4c5d71;
width: 33%;
min-width: 260px;
margin: none !important;}
#menu {
display: flex;
display: -webkit-flex;
-webkit-box-align: center;
align-items: center;
align-self: flex-end;
justify-content: flex-end;
width: 60%;
min-width: 800px;
float: right !important;
padding: 0% 0% 0% 0%;
margin: 0% 0% 0% 0%;}
ul {
float: right;
width: 100%;
padding-left: 9%;
padding-right: none !important;}
nav {
display: flex;
justify-content: flex-end;
float: right;}
li {
font-family: 'Cabin Sketch', cursive;
font-weight: 700;
font-size: 28px;
padding: 0vh 2vh 0vh 2vh;}
It seems like I've made a rookie mistake somewhere, but I can't figure out where. I attempted using -webkit- prefixes, but they didn't solve the issue. I also tried adding display: -webkit-flex; to #top, but it made things worse.
One solution I'm considering is creating a separate style sheet specifically for Safari to address these bugs. However, I'm aware that browser sniffing is not recommended.
Additionally, I have another flexbox element further down the homepage misbehaving in Safari. Your suggestions for the header section might help me tackle that as well. Any help would be greatly appreciated!