Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Mikael Ekström 14 posts 114 karma points
    Sep 15, 2017 @ 12:17
    Mikael Ekström
    0

    Changing automaticlly added style for H1

    Hello.

    I'm using the fanoe theme but with modified css. It is all really nice and good. But I still have one problem that I cant figure out.

    When i add a Banner Headline the H1 tag gets a style attribute with values from somewhere but i Cant figure out where it's coming from. Does anyone here know?

    This is what the rendered H1 looks like:

    <h1 style="font-size:62px;text-align:center;">Test Header</h1>
    

    I would like to remove the style attribute and its styling so I can have my Banner headline responsive and changing size depending on device.

    Help please!

    KR, Mikael

  • Rune Hem Strand 147 posts 911 karma points hq c-trib
    Sep 15, 2017 @ 21:41
    Rune Hem Strand
    0

    Hi Mikael

    If you haven't done so already I highly recommend reading the docs for Grid Layouts to get a full understanding it works.

    The Banner Headline uses the textstring grid editor, to see how the inline styling is generated for this look here.

    Specifically for the Fanoe Starterkit the custom editors are defined in /App_Plugins/Grid/Config/FanoeConfig.txt and you'll find the Banner Headline there:

    {
        "name": "Banner Headline",
        "alias": "banner_headline",
        "view": "textstring",
        "icon": "icon-coin",
        "config": {
            "style": "font-size: 36px; line-height: 45px; font-weight: bold; text-align:center",
            "markup": "<h1 style='font-size:62px;text-align:center'>#value#</h1>"
        }
    }
    

    Style controls the backoffice rendering and markup how the value is wrapped on the frontend. Edit that to suit your needs and you should be golden :)

    Hope that helps!

    All the best
    Rune

  • Mikael Ekström 14 posts 114 karma points
    Sep 16, 2017 @ 08:16
    Mikael Ekström
    0

    Found it and updated it but changing the file did not do it so I guess i have to rebuild something to make it work?

Please Sign in or register to post replies

Write your reply to:

Draft