Seeking advice on how to optimize my website for mobile devices. I have two separate CSS files - one for the mobile version and one for the desktop version. Combining them in the head of my HTML file is causing issues, as the background style from the desktop version is interfering with the mobile version, rendering it unusable. The CSS code for each version is completely different. Any suggestions on how I can make my site mobile-friendly while maintaining distinct backgrounds for both versions?
Here is an excerpt from the CSS code for the desktop version:
<link rel="stylesheet" href="index.css" charset="utf-8">
<link rel="stylesheet" href="mobile.css" charset="utf-8>
body {
padding: 0px 20px 0px 20px;
}
...
This is a snippet from the head section of my HTML:
<link rel="stylesheet" href="mobile.css" charset="utf-8">
<link rel="icon" href= "tabicon.png">
<title>Walibi Haunted Houses</title>
<div class="menubar">
...
</div>
Below is a segment of the CSS code specifically designed for the mobile version:
@media screen and (max-width: 500px) {
...
}