Jump to content

Add text to top of Index Page

Go to solution Solved by tuanphan,

Recommended Posts

Posted (edited)

Hi, 
I would like to add a short text/page description to the top of a certain index page on my site to describe what is shown in the index below. The text i would like to add is now below the index thumbnails but I want this above the thumbnails.
This would be used on the following page:

https://www.jirobosma.com/drone

Can i do that with custom CSS?

(I did try this solution but it did not work https://forum.squarespace.com/topic/226702-add-text-to-top-of-index-pages/)

Thanks!

 

Edited by JiroB
  • Replies 11
  • Views 2.4k
  • Created
  • Last Reply

Top Posters In This Topic

Posted

Thanks that works!
Can it also be a title line in bold for example, and another couple of lines below it in a normal font?
Like the attached image.

This is what i have now:
 

body#collection-65ba9c2d82e27a520f220005 .main-content:before {
    content: "Aerial Cinematography";
    display: block;
    text-align: center;
    margin-top: 10px;
    margin-bottom: 30px;
    font-size: 16px;
    font-weight: bold;
    color: grey;
}

 

Screenshot 2024-02-09 at 17.19.14.png

  • Solution
Posted

Use this code

body#collection-65ba9c2d82e27a520f220005 .main-content:before {
    content: "Aerial Cinematography \A line 2 line 2 line 2 \A Line 3 line 3 line 3";
    display: block;
    text-align: center;
    margin-top: 10px;
    margin-bottom: 30px;
    font-size: 16px;
    font-weight: bold;
    color: grey;
    white-space: pre-wrap;
}

image.png.e53755ef829444dbce9e3070fba1adf1.png

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

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Posted

Thanks. Iv'e updated with your code.
But the sublines need to be in a different font weight. and the enters aren't working.
So like this: Title in bold and size 16. and sublines in normal and size 15.

It has to look exactly like this attachment if possible. (the correct text and formatting is below the thumbnails on my site now)

Screenshot2024-02-09at17_19_14.thumb.png.0fde0711db723c5291585cd6600d3aff.png

  • 6 months later...
Posted
On 8/19/2024 at 9:12 AM, StallerMass said:

Hi tuanphan, I have a similar request.  I need to add description text between the navigation bar and images on these two index pages:

https://www.joshuakirsch.com/sculpture

https://www.joshuakirsch.com/fabrication

Your help would be greatly appreciated!

Thanks, Josh

You can use this to Website Tools > Custom CSS

#collection-575fc20540261df38922ffad #container-content:before {
    content: "Fabrication";
    display: block;
    font-size: 30px;
    text-align: center;
    margin-bottom: 20px;
}
#collection-576069805559865cc19ff580 #container-content:before {
    content: "Sculpture";
    display: block;
    font-size: 30px;
    text-align: center;
    margin-bottom: 20px;
}

 

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

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Posted
On 8/22/2024 at 4:58 AM, tuanphan said:

You can use this to Website Tools > Custom CSS

#collection-575fc20540261df38922ffad #container-content:before {
    content: "Fabrication";
    display: block;
    font-size: 30px;
    text-align: center;
    margin-bottom: 20px;
}
#collection-576069805559865cc19ff580 #container-content:before {
    content: "Sculpture";
    display: block;
    font-size: 30px;
    text-align: center;
    margin-bottom: 20px;
}

 

Thank you! This works great... however is there a way to have the text disappear when you navigate to a project?  Ideally the project pages look and function exactly as they did before, and the new description text is only on the two index pages.

Posted
On 8/26/2024 at 2:53 PM, StellarMass said:

Thank you! This works great... however is there a way to have the text disappear when you navigate to a project?  Ideally the project pages look and function exactly as they did before, and the new description text is only on the two index pages.

You can use this new code

#collection-575fc20540261df38922ffad:not(.index-detail) #container-content:before {
    content: "Fabrication";
    display: block;
    font-size: 30px;
    text-align: center;
    margin-bottom: 20px;
}
#collection-576069805559865cc19ff580:not(.index-detail) #container-content:before {
    content: "Sculpture";
    display: block;
    font-size: 30px;
    text-align: center;
    margin-bottom: 20px;
}

 

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

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Posted
On 8/27/2024 at 9:35 PM, tuanphan said:

You can use this new code

#collection-575fc20540261df38922ffad:not(.index-detail) #container-content:before {
    content: "Fabrication";
    display: block;
    font-size: 30px;
    text-align: center;
    margin-bottom: 20px;
}
#collection-576069805559865cc19ff580:not(.index-detail) #container-content:before {
    content: "Sculpture";
    display: block;
    font-size: 30px;
    text-align: center;
    margin-bottom: 20px;
}

 

Perfect! Thanks again!

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.