Jump to content

Subheadings with different font size on portfolio

Recommended Posts

  • Replies 13
  • Views 565
  • Created
  • Last Reply

Top Posters In This Topic

Hi!

I tried it out and it looks like this:

745451948_Screenshot2022-09-09at12_33_10.thumb.png.c88da41ae791612ef982124eb7c12658.png

It's made both rows pink, but i only want the 'UX/UI design' to be pink. Heres the code I currently have:

h3.portfolio-title:after {
    font-size: 16px;
    color: black;
    display: block;
    white-space: pre-wrap;
}
h3.portfolio-title:after {
    font-size: 18px;
    color: #cf347f;
}
a.grid-item[href="/projects/hatch"] h3:after {
    content: "UX/UI design \A Improving productivity through simplified task management";
}
a.grid-item[href="/projects/tumblrmobile"] h3:after {
    content: "UX/UI design \A Faciliating content creation, retrieval, and discovery";
}

Link to comment
On 9/12/2022 at 3:31 PM, paraselene said:

sorry, is there any update to this? i'm in a bit of a rush 😞

Sorry. Just had some travelling day.

Do you use Personal or Business Plan? Each plan will have a different solution

If you use a Business Plan or higher, follow these steps

  1. Edit title to this format: Hatch <em>UX/UI design</em><em>Improving productivity through simplified task management</em>
  2. Next, I will give the code to change color

This way, it will appear in both the Pagination Title, Browser Tab, and possibly Google Search Result.

If you use Personal Plan, let me know, I think I will give another approach using :after, :before, like the way you added small text

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

Try adding this CSS

/* first project */
a.grid-item[href="/projects/hatch"] {
h3:before {
    content: "UX/UI Design";
    display: block;
    position: absolute;
    top: 30px;
    color: pink;
    font-size: 15px;
    white-space: nowrap;
}
h3:after {
    content: "Improving productivity through simplified task management";
    position: absolute;
    top: 60px;
    width: 100%;
    white-space: nowrap;
}
h3.portfolio-title {
    position: absolute;
    top: 0;
}}
h3.portfolio-title:after {
    font-family: aktiv-grotesk;
    font-size: 16px;
    line-height: 1.8em;
    color: #000;
    display: block;
    white-space: pre-wrap;
}

 

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
On 9/18/2022 at 5:47 PM, tuanphan said:

Try adding this CSS

/* first project */
a.grid-item[href="/projects/hatch"] {
h3:before {
    content: "UX/UI Design";
    display: block;
    position: absolute;
    top: 30px;
    color: pink;
    font-size: 15px;
    white-space: nowrap;
}
h3:after {
    content: "Improving productivity through simplified task management";
    position: absolute;
    top: 60px;
    width: 100%;
    white-space: nowrap;
}
h3.portfolio-title {
    position: absolute;
    top: 0;
}}
h3.portfolio-title:after {
    font-family: aktiv-grotesk;
    font-size: 16px;
    line-height: 1.8em;
    color: #000;
    display: block;
    white-space: pre-wrap;
}

 

668581084_Screenshot2022-09-20at19_01_16.png.5c2cfe4a138961d666c1da28f14841e2.png

the code works! except on mobile view the spacing is incorrect. do you know how to fix the spacing on mobile?

Link to comment
14 hours ago, paraselene said:

 

the code works! except on mobile view the spacing is incorrect. do you know how to fix the spacing on mobile?

Try this new code

a.grid-item[href="/projects/hatch"] {
h3:before {
    content: "UX/UI Design";
    display: block;
    position: absolute;
    top: 30px;
    color: pink;
    font-size: 15px;
    white-space: nowrap;
}
h3:after {
    content: "Improving productivity through simplified task management";
    position: absolute;
    top: 60px;
    width: 100%;
    white-space: nowrap;
}
h3.portfolio-title {
    position: absolute;
    top: 0;
}}
h3.portfolio-title:after {
    font-family: aktiv-grotesk;
    font-size: 16px;
    line-height: 1.8em;
    color: #000;
    display: block;
    white-space: pre-wrap;
}
@media screen and (max-width:767px) {
div#gridThumbs {
    grid-row-gap: 150px;
}
}

 

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

Try this

a.grid-item[href="/projects/hatch"] {
h3:before {
    content: "UX/UI Design";
    display: block;
    position: absolute;
    top: 30px;
    color: pink;
    font-size: 15px;
    white-space: nowrap !important;
}
h3:after {
    content: "Improving productivity through simplified task management";
    position: absolute;
    top: 60px;
    width: 100%;
    white-space: nowrap;
}
h3.portfolio-title {
    position: absolute;
    top: 0;
}}
h3.portfolio-title:after {
    font-family: aktiv-grotesk;
    font-size: 16px;
    line-height: 1.8em;
    color: #000;
    display: block;
    white-space: pre-wrap;
}
@media screen and (max-width:767px) {
div#gridThumbs {
    grid-row-gap: 150px;
}
h3:after {
    white-space: initial !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
On 9/23/2022 at 5:53 PM, tuanphan said:

Try this

a.grid-item[href="/projects/hatch"] {
h3:before {
    content: "UX/UI Design";
    display: block;
    position: absolute;
    top: 30px;
    color: pink;
    font-size: 15px;
    white-space: nowrap !important;
}
h3:after {
    content: "Improving productivity through simplified task management";
    position: absolute;
    top: 60px;
    width: 100%;
    white-space: nowrap;
}
h3.portfolio-title {
    position: absolute;
    top: 0;
}}
h3.portfolio-title:after {
    font-family: aktiv-grotesk;
    font-size: 16px;
    line-height: 1.8em;
    color: #000;
    display: block;
    white-space: pre-wrap;
}
@media screen and (max-width:767px) {
div#gridThumbs {
    grid-row-gap: 150px;
}
h3:after {
    white-space: initial !Important;
}
}

 

1929980855_Screenshot2022-09-25at11_59_58.png.b04efc9578139f9e19a280389a855a82.png

sorry, it doesn't really work 😕 it jumps to the next line too quickly

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.