Jump to content

css in the <head> of some pages with the transparent header

Recommended Posts

Posted

Site URL: https://www.inesgomez.com/mes-services

Hello, I am having a problem with some CSS injecting into some particular pages. My header menu is checked to be transparent, which means that we can see the lines of code when we are at the top of my page, do you know if this can be adjusted without having to remove the transparent mode from my header menu?

Capture d’écran 2021-05-14 à 23.07.17.png

  • Replies 3
  • Views 393
  • Created
  • Last Reply
Posted
1 hour ago, inesgjq said:

Site URL: https://www.inesgomez.com/mes-services

Hello, I am having a problem with some CSS injecting into some particular pages. My header menu is checked to be transparent, which means that we can see the lines of code when we are at the top of my page, do you know if this can be adjusted without having to remove the transparent mode from my header menu?

Capture d’écran 2021-05-14 à 23.07.17.png

Hi. you need to wrap your code with <style> tag. below is a example

<style>//Add CSS code here</style>

Posted
9 hours ago, Agha_Waqas said:

Hi. you need to wrap your code with <style> tag. below is a example

<style>//Add CSS code here</style>

thank you for your answer, indeed with these tags we no longer see my lines of code, but they also no longer have an effect on my page, this line of code allowed to create a scrolling question when we clicked on the question . Now the questions are all open with the answer below.

Posted
On 5/15/2021 at 1:03 PM, inesgjq said:

thank you for your answer, indeed with these tags we no longer see my lines of code, but they also no longer have an effect on my page, this line of code allowed to create a scrolling question when we clicked on the question . Now the questions are all open with the answer below.

Hi. i just noticed in developer console it shows error. will you double check in the footer section the <script> tag you are using, did you close it like this </script>. due to this markdown code is not working may be

<script>

//js code

</script>

and also i see you added the style tag around the JavaScript code. Correct code is below. copy paste below code into header page. remove yours.

  <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script>
    $(document).ready(function(){
    $('.markdown-block .sqs-block-content h4').addClass('ui-closed').css('cursor','pointer');
    $(".markdown-block .sqs-block-content h4").nextUntil("h4").slideToggle();
    $(".markdown-block .sqs-block-content h4").click(function() {
      
      $(this).nextUntil("h4").slideToggle();
      $(this).toggleClass('ui-closed ui-open');
      });
    });
    </script>
<style>
.markdown-block p {
margin-left:1.5em;
}
 
.markdown-block .ui-closed:before {
  font-family:monospace;
  content:"+ ";
}

.markdown-block .ui-open:before {
  font-family:monospace;
  content:"- ";
}

</style>
  

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.