The forum of the forums

Would you like to react to this message? Create an account in a few clicks or log in to continue.
The forum of the forums
5 posters

    CSS/HTML color gradient

    Mineko
    Mineko
    Forumember


    Female Posts : 57
    Reputation : 1
    Language : Hungarian
    Location : Hungary

    Solved CSS/HTML color gradient

    Post by Mineko Mon 9 Nov - 15:25

    Hello, again Very Happy
    I would have a question that I have this CSS code below.
    Code:
    background: rgb (255,255,255);
    background: linear gradient (90deg, rgba (255,255,255,1) 0%, rgba (209,209,209,1) 50%, rgba (255,255,255,1) 100%);
    How could this be rewritten to use as a border-color?
    Or maybe I should use a completely different code to do a gradient? q.q
    YoshiGM
    YoshiGM
    Active Poster


    Male Posts : 1557
    Reputation : 146
    Language : Spanish & English
    Location : Mexico

    Solved Re: CSS/HTML color gradient

    Post by YoshiGM Mon 9 Nov - 16:08

    Hello,
    You can use that in any zone of your forum. Simply inspect and then add the properties. For example:

    Code:

    .module {
    background: rgb (255,255,255);
    background: linear gradient (90deg, rgba (255,255,255,1) 0%, rgba (209,209,209,1) 50%, rgba (255,255,255,1) 100%);
    }

    This is for your widgets.
    You can also check this for more information: https://css-tricks.com/gradient-borders-in-css/
    and of course this: https://help.forumotion.com/t42099-learning-the-basic-css



    Mineko
    Mineko
    Forumember


    Female Posts : 57
    Reputation : 1
    Language : Hungarian
    Location : Hungary

    Solved Re: CSS/HTML color gradient

    Post by Mineko Mon 9 Nov - 16:21

    I want to snag the gradient into this.
    Code:
    <div style = "width: 490px; border-right: 5px double; border-left: 5px double; border-color: # C0C0C0; border-radius: 20px; padding: 10px; margin-top: 10px; line-height: 20px; "> </div>
    How?
    YoshiGM
    YoshiGM
    Active Poster


    Male Posts : 1557
    Reputation : 146
    Language : Spanish & English
    Location : Mexico

    Solved Re: CSS/HTML color gradient

    Post by YoshiGM Mon 9 Nov - 16:24

    All CSS attributes that you add after the equal sign be readed by the browser.

    Code:
    <div style="width: 490px; border-right: 5px double; border-left: 5px double; border-color: # C0C0C0; border-radius: 20px; padding: 10px; margin-top: 10px; line-height: 20px; background: rgb (255,255,255);background: linear gradient (90deg, rgba (255,255,255,1) 0%, rgba (209,209,209,1) 50%, rgba (255,255,255,1) 100%);"> </div>

    Mineko
    Mineko
    Forumember


    Female Posts : 57
    Reputation : 1
    Language : Hungarian
    Location : Hungary

    Solved Re: CSS/HTML color gradient

    Post by Mineko Mon 9 Nov - 17:07

    https://i.imgur.com/Jrww6zc.png

    Well ... it looks like the forum is protesting now because it doesn't do it. Sad
    TheCrow
    TheCrow
    Manager
    Manager


    Male Posts : 6916
    Reputation : 795
    Language : Greek, English

    Solved Re: CSS/HTML color gradient

    Post by TheCrow Mon 9 Nov - 17:42

    @Mineko,

    You want this to be on the borders? Not as a background?



    CSS/HTML color gradient Thecro10
     Forum of the Forums

    Forumotion Rules | Tips & Tricks |
    FAQ | Did you forget your password?



    *** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
    No support via PM!
    Mineko
    Mineko
    Forumember


    Female Posts : 57
    Reputation : 1
    Language : Hungarian
    Location : Hungary

    Solved Re: CSS/HTML color gradient

    Post by Mineko Mon 9 Nov - 18:46

    I want it for Border, but that's how the code generator issued it. :/ q.q
    tikky
    tikky
    Forumember


    Posts : 922
    Reputation : 159
    Language : 🇵🇹

    Solved Re: CSS/HTML color gradient

    Post by tikky Mon 9 Nov - 22:02

    Hello @Mineko,

    How could this be rewritten to use as a border-color?
    Here:
    Code:
      border: 5px solid;
      border-image: linear-gradient(90deg, rgba(255,255,255,1), rgba(209,209,209,1), rgba(255,255,255,1)) 1;
      box-sizing: border-box;

    and
    I want to snag the gradient into this.
    Code:
    <div style="width: 490px; border: 5px solid;  border-image: linear-gradient(90deg, rgba(255,255,255,1), rgba(209,209,209,1), rgba(255,255,255,1)) 1;  box-sizing: border-box; margin-top: 10px; line-height: 20px;"></div>

    BlackScorpion and TonnyKamper like this post

    Mineko
    Mineko
    Forumember


    Female Posts : 57
    Reputation : 1
    Language : Hungarian
    Location : Hungary

    Solved Re: CSS/HTML color gradient

    Post by Mineko Mon 9 Nov - 22:39

    Oh, I love * - *
    You solve all my problems <3
    Thanks, @pedxz <3

    Solved Very Happy

    tikky likes this post

    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51500
    Reputation : 3523
    Language : English
    Location : United States

    Solved Re: CSS/HTML color gradient

    Post by SLGray Tue 10 Nov - 0:30

    Problem solved & topic archived.
    Please read our forum rules:  ESF General Rules



    CSS/HTML color gradient Slgray10

    When your topic has been solved, ensure you mark the topic solved.
    Never post your email in public.

      Current date/time is Tue 24 Sep - 17:21