[Resolved] css for increasing in size and changing color of a php generated button

Home Forums Support css for increasing in size and changing color of a php generated button

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #357988
    robmac

    Hi,

    Apologies, I tried to find this in previous answers to forum questions…but nothing really nailed it!

    I’ve generated, by php, a post, the post contains a “More Details” button, that takes people to an external link.

    I’ve tried different CSS to increase the button size and change both the actual button color and the text on it, but no luck.

    I’m not sure if the CSS I’m using is right, I used a plugin called “Site Origin/CSS” to generate the code, I then enter that code in to Simple CSS – I ONLY save the code to Simple CSS. I only use Site Origin to guide me in generating the actual code – works great, saves a mountain of time for a non-coder like me, except with this. Below is a starting point Site Origin generates:

    a img {
    color: #d16014;
    font-size: 20px;
    line-height: 25px;
    font-weight: bold;
    }

    The figures, in the above example are just a stab in the dark to get started – but is “a img” a legitimate starting point for button CSS?

    Any help appreciated. Thank you.

    GP Premium 1.3.1
    #358096
    Leo
    Staff
    Customer Support

    Hi there,

    Any chance you can provide a link to your site so we can see the button?

    Thanks!

    #358171
    Leo
    Staff
    Customer Support

    Hmm that’s an image file so you can’t really increase the size without losing quality and certain can’t change the color using CSS: http://www.decorandflooring.com/media/images/details.gif

    It would be the best to just edit the image file itself and reupload it.

    Or you can make your own button using CSS: https://docs.generatepress.com/article/adding-buttons/

    #358405
    robmac

    OK…thank you Leo for taking a look and your expert advice, much appreciated.

    #358412
    Leo
    Staff
    Customer Support

    You’re very welcome 🙂

    #359616
    robmac

    Hi Tom/Leo,

    Follow-up to the above please.

    re http://www.decorandflooring.com/test-blog-post/

    Try as I might…I’m not having any luck turning the ENTIRE [including header and footer region sections] post linked above, into the bright yellow/gold color I’ve currently got SOME of it displaying as….if I can get the CSS rules right, I can then play around with the final color choices. So far, I’ve tried the CSS rules lsted below.

    Could you offer any suggestions please, on CSS rules I’m missing? I’d also like to include the SAME color for visited and hover-over functions – so the ENTIRE post appears as just a solid one color please. Any advice appreciated please. Thank you.

    header-content {
    background-color: #EFBC46;
    }

    body {
    background: #EFBC46;
    }

    content {
    background: #EFBC46;
    }

    header {
    background: #EFBC46;
    }

    footer {
    background: #EFBC46;
    }

    inner-content {
    background: #EFBC46;
    }

    td {
    background: #EFBC46;
    }

    #359701
    Leo
    Staff
    Customer Support

    You are wanting that color/style only on that page I assume? or all posts?

    #359703
    robmac

    only that ONE page please.

    #359708
    Leo
    Staff
    Customer Support

    CSS classes need to start with a dot.

    Try something like this

    .site-header, .separate-containers .inside-article, td, .site, .site-content, body {
        background-color: #EFBC46 !important;
    }

    Make sure you use Tom’s Simple CSS plugin and insert the add in the page CSS metabox.

    #359713
    robmac

    Thank you Leo….much appreciated.

    #359718
    Leo
    Staff
    Customer Support
    #359722
    robmac

    Thanks Leo – it 98% worked….if I could please ask one more thing, I’ve already tried a few alternates to fix it myself – but down each side of the page in question, there’s a strip that’s not changed to the desired color…any suggestions please? Thank you.

    #359744
    Leo
    Staff
    Customer Support
    #359750
    robmac

    Thank you Leo…you must have the “magic touch”, because I did it all by the book, looked at the source code, saw “body” entered it [and obviously I didn’t do it right], because it didn’t work….your way worked straight off the bat!

    Thanks again!

    #359755
    Leo
    Staff
    Customer Support

    You’re very welcome 🙂

Viewing 15 posts - 1 through 15 (of 15 total)
  • You must be logged in to reply to this topic.