Jump to content

Help with CSS and HTML on a blog post

Recommended Posts

Site URL: https://alwaysnothing.com/

Hi,

I am trying to add CSS code to a specific blog post. It gives me the option under "add block" then "code" within the blog post iteself, I am putting CSS in that box but its not working. I do see another place to add CSS under the left side column there is a gear icon and under advanced there is a CSS setting, but its for business plans, can I not simply do this through the blog page itself?

For example: Where would this CSS be pasted?

.steps {
  clear: both;
  list-style: none;
  padding-left: 2%;
}
.steps li {
  margin: 2em 0;
  padding-top: 1em;
  display: block;
  position: relative;
  counter-increment: inst;
}
.steps li::before {
  content: counter(inst);
  
  background: rgba(255, 150, 0, 0.35);
  color: #fff;
  
  font-size: 1em;
  font-weight: 700;
  font-style: italic;
  text-shadow: 1px 1px rgba(255, 150, 0, 0.5);
  
  border-radius: 0 0.675em 0.675em 0;
  font-size: 1.5em;
  text-align: center;
  
  padding-top: 0;
  padding-left: 2.25%;
  left: -5%;
  top: -0.65em;
  height: 1.35em;
  width: 1.35em;
  position: absolute;
  
  transition: all 0.2s ease-in-out;
  
  z-index: -1;
}
@media (min-width: 33em) {
  .steps li:before {
    border-radius: 50%;
    font-size: 1.5em;
    height: 1.35em;
    margin-left: 2.5%;
    padding-left: 0;
    padding-top: 0;
    top: -0.15em;
    width: 1.35em;
    z-index: -1;
  }
}

body {
  font-size: 25px;
}

 

 

And the HTML, where would this go?

<ol class="steps">
  <li>Dice the potatoes and boil them in lightly salted water, until tender when jabbed with a fork.</li>
  <li>Dice the potatoes and boil them in lightly salted water, until tender when jabbed with a fork.</li>
  <li>Dice the potatoes and boil them in lightly salted water, until tender when jabbed with a fork.</li>
  <li>Dice the potatoes and boil them in lightly salted water, until tender when jabbed with a fork.</li>
  <li>Dice the potatoes and boil them in lightly salted water, until tender when jabbed with a fork.</li>
</ol>
Link to comment
  • Replies 1
  • Created
  • Last Reply

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.