Jump to content

second font size for mobile version

Recommended Posts

Site URL: https://clarinet-salamander-b4cz.squarespace.com/config/pages

Hi guys,  

I am wondering is there a way to set two different font sizes one for mobile version and one for desktop? I tried with responsive font but I want the font to stay at the same size also when I make a smaller window, just for mobile version my font-size is to big so there is a break in the headerword

here is the code I am currently working with:

Does anyone has a hint? Would be really nice to get some help !:)  

<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
* {box-sizing: border-box;}

body { 
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
}

.header {
  overflow: hidden;
  padding: 12px 10px;
  background-color:red;
}

.header a {
  float: left;
  color: white;
  text-align: center;
  padding: 12px;
  text-decoration: none;
  font-size: 18px; 
  line-height: 17px;
  border-radius: 4px;
}

.header-right {
  float: right;
}

@media screen and (max-width: 500px) {
  .header a {
    float: none;
    display: block;
    text-align: left;
    font-size: 2em; 
  }
  
  .header-right {
    float: none;
  }
}
</style>
</head>
<body>
<div class="header">
  <a href="#default" class="logo"> <span style="text-transform:uppercase;font-size:90px; font-family:Stempel Garamond LT Std ; position:relative; top:15px;"> Nonna </span> <span style="font-style: italic; font-family:Stempel Garamond LT Std; font-size:55px;position:relative; top:15px; left:-20px;">stories</a>
  <div class="header-right" style:"position:relative; left:-20px;">
    <a class="active" href="#home" style="font-family:ITC Franklin Gothic Std ; text-transform:uppercase; position:relative; top:30px; font-size:20px;">Home</a>
    <a href="#contact" style="font-family:ITC Franklin Gothic Std ; text-transform:uppercase; position:relative; top:30px;">Contact</a>
    <a href="#about" style="font-family:ITC Franklin Gothic Std ; text-transform:uppercase; position:relative; top:30px;">About</a>
  </div>
</div>


</body>
</html>

Bildschirmfoto 2020-08-21 um 08.57.33.png

Bildschirmfoto 2020-08-21 um 08.57.39.png

Link to comment
  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted Images

You mean Site Title?

Add to Home > Design > Custom CSS

@media screen and (max-width:767px) {
/* nona */
.header a span:first-child {
    font-size: 50px !Important;
}
/* stories */
.header a span:last-child {
    font-size: 30px !Important;
}
/* menu */
.header-right * {
    font-size: 10px !important;
}
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.