Jump to content

Adding custom text on a banner

Recommended Posts

  • Replies 12
  • Views 598
  • Created
  • Last Reply

Top Posters In This Topic

Add it to Design > Custom CSS

body.homepage:after {
    content: "I'm a Full-Stack Product Designer from Boston, Massachusetts";
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    z-index: 99999;
    color: #f1f;
    font-size: 50px;
    text-align: center;
    width: 65%;
}

 

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!)

Link to comment

This works, except the text still appears when the banner of the other portfolio items are revealed (when I hover over the portfolio menu items).

Also, It remains in the same position no matter where I scroll on the screen.

How can this code be modified so that the text only appears in the center of the default banner, and disappears when another cover images appear?

Edited by Squarepegroundhole01
Link to comment

for more context. I'm looking for behavior similar to the Hensen template in 7.0

 

The home page can display default response text (it's not a static image)

However, when you hover over the links, it displays the second image (the text disappears).

I want to do that for my page.

Additionally, I like some code highlighting (not just underlining)  the link I'm hovering over.

 

image.thumb.png.5b1ac7ac9f50f846cce640c6cfc68aa0.png

 

image.thumb.png.d5dd1af28f909f1a0eef895c49abc5fe.png

 

 

Edited by Squarepegroundhole01
Link to comment

no, the code you provided previously keeps the text on the center of the screen even after I hover over the portfolio links.

I need the following code modified so that the text disappears when I hover over the portfolio links. The customer text should also only be in the center of the banner image.

 

body.homepage:after {
    content: "I'm a Full-Stack Product Designer from Boston, Massachusetts";
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    z-index: 99999;
    color: #f1f;
    font-size: 50px;
    text-align: center;
    width: 65%;
}

 

Link to comment
On 4/2/2023 at 3:17 PM, tuanphan said:

Add it to Design > Custom CSS

body.homepage:after {
    content: "I'm a Full-Stack Product Designer from Boston, Massachusetts";
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    z-index: 99999;
    color: #f1f;
    font-size: 50px;
    text-align: center;
    width: 65%;
}

 

Use this new code

body.homepage ul.portfolio-hover-items-list li:after {
    content: "I'm a Full-Stack Product Designer from Boston, Massachusetts";
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    z-index: 99999;
    color: #f1f;
    font-size: 50px;
    text-align: center;
    width: 65%;
    line-height: 1.5em;
}
body.homepage ul:hover li:after{
    visibility: hidden !important;
}

 

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!)

Link to comment

The code you provided keeps the pink text fixated in the middle of the screen until the banner is off-screen. I need the pink text in the middle of the banner, not the page. So the pink text should move up as I scroll down the page.

(refer to the image below. I scrolled down to the middle of my home page. Ideally, the pink text should be where the white text is).

Another issue - the pink text disappears when my cursor hovers over it. I only need the pink text to disappear when I hover over the links, not the text itself.
 

 

image.thumb.png.4356c055cbcaa1f5626f7fb9591e1511.png

 

body.homepage ul.portfolio-hover-items-list li:after {
    content: "I'm a Full-Stack Product Designer from Boston, Massachusetts";
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    z-index: 99999;
    color: #f1f;
    font-size: 50px;
    text-align: center;
    width: 65%;
    line-height: 1.5em;
}
body.homepage ul:hover li:after{
    visibility: hidden !important;
}

 

Edited by Squarepegroundhole01
Link to comment
  • 2 weeks later...

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.