HOME | DD

Celvas β€” Let's code! Pushable Buttons
Published: 2013-11-16 00:05:29 +0000 UTC; Views: 23454; Favourites: 327; Downloads: 0
Redirect to original
Description /* ---- Goners / Importants ---- */ body div#devskin10611449 .gr { padding:0!important; } body div#devskin10611449 .gr-top img, body div#devskin10611449 .gr1, body div#devskin10611449 .gr2, body div#devskin10611449 .gr3, body div#devskin10611449 .tri, body div#devskin10611449 .prevlink, body div#devskin10611449 .lit img, body div#devskin10611449 .external:after, body div#devskin10611449 .user-symbol, body div#devskin10611449 .list img, body div#devskin10611449 .timestamp, body div#devskin10611449 .c { display:none; } /* ---- Universal Selector ---- */ body div#devskin10611449 * { background:transparent; border:none; margin:0; padding:0; } /* ---- user symbols ---- */ body div#devskin10611449 .banned.username:before { content:'!' !important; } body div#devskin10611449 .group.username:before { content:'#' !important; } body div#devskin10611449 .regular.username:before { content:'~' !important; } body div#devskin10611449 .hell.username:before { content:'*' !important; } body div#devskin10611449 .hell-beta.username:before { content:'=' !important; } body div#devskin10611449 .premium.username:before { content:'*' !important; } body div#devskin10611449 .beta.username:before { content:'=' !important; } body div#devskin10611449 .senior.username:before { content:'`' !important; } body div#devskin10611449 .volunteer.username:before { content:'^' !important; } body div#devskin10611449 .admin.username:before { content:'$' !important; } /* ----- List tweaking ----- */ body div#devskin10611449 ul, body div#devskin10611449 ol, body div#devskin10611449 ul ul, body div#devskin10611449 ol ol, body div#devskin10611449 ul ul ul, body div#devskin10611449 ol ol ol { margin-left:30px; } /* ---- hr ---- */ body div#devskin10611449 hr { border-bottom:1px dotted #bfbfbf; width:100%; } /* ---- fonts ---- */ body div#devskin10611449 .text h1, body div#devskin10611449 .text h2, body div#devskin10611449 .text h3, body div#devskin10611449 .text h4, body div#devskin10611449 .text h5, body div#devskin10611449 .text h6 { display:inline; color:#a11300; font-family:'Sintony', sans-serif; font-weight:600!important; } body div#devskin10611449 .text h1 { color:#2C3635 !important; } body div#devskin10611449 .text h1 a, body div#devskin10611449 .text h2 a, body div#devskin10611449 .text h3 a, body div#devskin10611449 .text h4 a, body div#devskin10611449 .text h5 a, body div#devskin10611449 .text h6 a { color:#2C3635; font-weight:400; text-decoration:none; } body div#devskin10611449 .text h1 a { color:#2C3635 !important; } body div#devskin10611449 .text h1 a:hover, body div#devskin10611449 .text h2 a:hover, body div#devskin10611449 .text h3 a:hover, body div#devskin10611449 .text h4 a:hover, body div#devskin10611449 .text h5 a:hover, body div#devskin10611449 .text h6 a:hover { color:#F96E5B; } body div#devskin10611449 .text h1 a:hover { color:#F96E5B !important; } body div#devskin10611449 .text h1 { font-size:18pt; } body div#devskin10611449 .text h2 { font-size:15.5pt; } body div#devskin10611449 .text h3 { font-size:13pt; } body div#devskin10611449 .text h4 { font-size:12pt; } body div#devskin10611449 .text h5 { font-size:9.5pt; } body div#devskin10611449 .text h6 { font-size:7.5pt; } /* ---- special text ---- */ body div#devskin10611449 .text .h3b { background:url('https://fc03.deviantart.net/fs71/f/2013/315/7/a/greylines_by_celvas-d6txqn6.gif') repeat; min-height:8px; width:100%; color:inherit; font-family:'Sintony', sans-serif; font-size:11pt; font-weight:600; text-align:center; } body div#devskin10611449 .text .h3bbg { background:#e8e8e8; padding:0 10px; } /* ---- font attributes ---- */ body div#devskin10611449 b { font-weight:600; } body div#devskin10611449 strong { background:#dadada; padding-left:2px; padding-right:2px; color:#272727; } /* ---- gr-box ---- */ body div#devskin10611449 .gr-box { background:url('https://fc06.deviantart.net/fs71/f/2013/315/e/e/journalskinbase_by_celvas-d6tvzn7.jpg') repeat; max-width:800px; margin:auto; } /* ---- negate box margin ---- */ body div#devskin10611449 .negate-box-margin { background:url('https://fc06.deviantart.net/fs71/f/2013/315/e/e/journalskinbase_by_celvas-d6tvzn7.jpg') repeat; border-top:1px solid #bfbfbf; border-bottom:1px solid #bfbfbf; } body div#devskin10611449 .negate-box-margin:before { opacity:0.3; filter:alpha(opacity=30); _zoom:1; position:absolute; top:80px; left:0; content:''; background:url('https://fc09.deviantart.net/fs71/f/2013/310/c/4/devid_by_celvas-d6t8qp7.jpg') no-repeat; width:290px; height:405px; } body div#devskin10611449 .negate-box-margin:after { position:absolute; top:75px; content:''; width:100%; border-bottom:1px solid #bfbfbf; } /* ---- gr-top h2 ---- */ body div#devskin10611449 .gr-top h2 { margin-top:15px; color:#000; font-family:'Sintony', sans-serif; font-size:22px; font-weight:300; } body div#devskin10611449 .gr-top h2 a { color:#000; } body div#devskin10611449 .gr-top h2 a:hover { color:#000; } /* ---- index ---- */ body div#devskin10611449 .index { position:absolute; top:0; left:20px; color:#000 !important; font-size:7.5pt; z-index:50; } body div#devskin10611449 .index a { color:rgb(0, 0, 0); color:rgba(0, 0, 0, 0.4) !important; font-weight:300 !important; text-decoration:none; } body div#devskin10611449 .index a:hover { color:#ed8744 !important; } /* ---- text ---- */ body div#devskin10611449 .text { padding-top:15px; color:#333; text-align:justify; } body div#devskin10611449 .text a { color:#b90504; font-weight:600; } body div#devskin10611449 .text a:hover { color:#ed8744; } /* ---- bs button ---- */ body div#devskin10611449 .bsbutton { background:#d3d3d3; background: -webkit-linear-gradient(top, #d3d3d3 0%, #bfbfbf 100%); background: -moz-linear-gradient(top, #d3d3d3 0%, #bfbfbf 100%); background:linear-gradient(to bottom, #d3d3d3 0%, #bfbfbf 100%); border:1px solid #b9b9b9; border-radius:2px; -moz-border-radius:2px; -webkit-border-radius:2px; padding:2px; cursor:pointer; } body div#devskin10611449 .bsbutton:hover { background:#bfbfbf; background: -webkit-linear-gradient(top, #bfbfbf 0%, #d3d3d3 100%); background: -moz-linear-gradient(top, #bfbfbf 0%, #d3d3d3 100%); background:linear-gradient(to bottom, #bfbfbf 0%, #d3d3d3 100%); } body div#devskin10611449 .bsbutton:active { background:#bfbfbf; background: -webkit-linear-gradient(top, #bfbfbf 0%, #d3d3d3 100%); background: -moz-linear-gradient(top, #bfbfbf 0%, #d3d3d3 100%); background:linear-gradient(to bottom, #bfbfbf 0%, #d3d3d3 100%); border-top:1px solid #adadad; border-left:1px solid #adadad; border-right:1px solid #fff; border-bottom:1px solid #fff; box-shadow:inset 0 0 0 1px #bfbfbf; -moz-box-shadow:inset 0 0 0 1px #bfbfbf; -webkit-box-shadow:inset 0 0 0 1px #bfbfbf; } /* ---- TehBoxesCry ---- */ body div#devskin10611449 .ibox { width:50%; margin-left:100px; } body div#devskin10611449 .ibox2 { margin-left:100px; } body div#devskin10611449 .ibox a, body div#devskin10611449 .ibox a:hover { text-decoration:none; } /* ---- button for real ---- */ body div#devskin10611449 .button1c, body div#devskin10611449 .button1b, body div#devskin10611449 .button1a { position:relative; background:#ef9554; background: -webkit-linear-gradient(top, #ef9554 0%, #ec7a35 100%); background: -moz-linear-gradient(top, #ef9554 0%, #ec7a35 100%); background:linear-gradient(to bottom, #ef9554 0%, #ec7a35 100%); border-bottom:1px solid #ef9554; border-radius:5px; -moz-border-radius:5px; -webkit-border-radius:5px; padding:10px 15px; color:#fff; font-size:13pt; cursor:pointer; box-shadow:inset 0 20px #f09a5f, inset 0 21px #f2a675, 0 5px #ca5b19, 0 7px 2px #999; -moz-box-shadow:inset 0 20px #f09a5f, inset 0 21px #f2a675, 0 5px #ca5b19, 0 7px 2px #999; -webkit-box-shadow:inset 0 20px #f09a5f, inset 0 21px #f2a675, 0 5px #ca5b19, 0 7px 2px #999; } body div#devskin10611449 .button1c:hover, body div#devskin10611449 .button1b:hover { top:3px; box-shadow:inset 0 20px #f09a5f, inset 0 21px #f2a675, 0 2px #ca5b19, 0 3px 2px #999; -moz-box-shadow:inset 0 20px #f09a5f, inset 0 21px #f2a675, 0 2px #ca5b19, 0 3px 2px #999; -webkit-box-shadow:inset 0 20px #f09a5f, inset 0 21px #f2a675, 0 2px #ca5b19, 0 3px 2px #999; } body div#devskin10611449 .button1c:active { top:5px; box-shadow:inset 0 0 0 1px #ca5b19, inset 0 20px #f09a5f, inset 0 21px #f2a675; -moz-box-shadow:inset 0 0 0 1px #ca5b19, inset 0 20px #f09a5f, inset 0 21px #f2a675; -webkit-box-shadow:inset 0 0 0 1px #ca5b19, inset 0 20px #f09a5f, inset 0 21px #f2a675; } /* ---- info box ---- */ body div#devskin10611449 .info { position:relative; display:inline; } body div#devskin10611449 .info img { position:relative; top:2px; left:3px; cursor:pointer; } body div#devskin10611449 .info span { position:absolute; display:none; bottom:20px; left:-100px; background:url('https://fc06.deviantart.net/fs71/f/2013/315/e/e/journalskinbase_by_celvas-d6tvzn7.jpg') repeat; min-width:200px; border:1px solid #bfbfbf; padding:10px 15px; text-align:center; box-shadow:1px 1px 2px #999; -moz-box-shadow:1px 1px 2px #999; -webkit-box-shadow:1px 1px 2px #999; } body div#devskin10611449 .info:hover span { display:block; } /* ---- bottom index ---- */ body div#devskin10611449 .bindex { position:relative; margin-bottom:5px; margin-left:30px; color:#000 !important; font-size:7.5pt; z-index:50; } body div#devskin10611449 .bindex a { color:rgb(0, 0, 0); color:rgba(0, 0, 0, 0.4) !important; font-weight:300 !important; text-decoration:none; } body div#devskin10611449 .bindex a:hover { color:#ed8744 !important; } /* ---- shbox ---- */ body div#devskin10611449 .shbox { background:rgb(0, 0, 0); background:rgba(0, 0, 0, .03); border:2px solid #cacaca; width:70%; padding:5px; margin:auto; text-align:center; }

Celvas > Gallery > Tutorials & References



Introduction


Buttons.

You all know buttons, because buttons are everywhere. We mostly take them for granted. They are there to direct us to somewhere else and God protect a button that doesn't do exactly that. We rarely give them a second thought, despite the fact that the appearance of a button is as much a design choice as any other element; a button can make or break a design.

Small advice: Simple (or rather: easy to navigate) is the new black. We established that buttons are part of that equation. It is my experience that buttons in journal designs aren't that highly sought after. People want them for their function, and even then rarely use them. Myself, I love to make buttons for one simple reason: It's a tonnage of fun.


  • What we'll be doing
  • The button base
  • Hover and active states


  • 1. What we'll be doing


    This CSS button.

    Kidding. We'll make a spiff one. I'll elaborate. We will make a button that is pushable. Meaning it appears 3D without being 3D, and has a push animation without actually being animated. It's an effect that is easily acquired, all in all, and, in this case, requires three steps: The basic button, the one that doesn't do anything but look good; the hover button, the one slightly pushed down upon cursor contact; the active button, the one completely pushed down.

    Ah, I guess I should tell you why you need to fake an animation. It's a CSS3 feature, and deviantART compels you to use (pretty much) none of those. You don't even have all pre-CSS3 stuff at your disposal, and I tell you right now: a lot of the rad stuff you see the coders here accomplish have gone through a process of How-do-I-make-it-look-as-if. Sometimes, we're all Wicked Witches of the West, and I'm waiting for someone to point out exactly how many times I've recommended people to join a coven.

    Moving on.

    We will strive not only for functionality and animation-fake, but also for a spiff look. Which is why this tutorial will also cover some basics about the box-shadow property and how to use it (with care, and reckless abandon). There's more: I'll explain every property used, not in the greatest detail, but ensuring that you'll get the picture and can get to work on actively pushing your own troops towards claiming Fort Button.



    2. The button base


    Whoever said all roads lead to Rome has never worked in coding. This is my way of saying that the button I'll make here is an example button I have decided upon after a little deliberation. Once you got the basics down you can create buttons as clown-crazy as you like, and you can use images, and you can use images and CSS, and if you weren't on deviantART, you could also script the living daylight out of 'em, but as it so happens, images and CSS it will have to be.

    For my button base, you'll need seven colors in hex code format.


    Button Base



    Two of them will be a linear-gradient that makes for the main part of the button, the background. One color goes to border-bottom, and the remaining four colors are the box-shadows, with one of them being the shadow. Now, the shadow usually is a grey shade as dark or bright as the general background requires. While a shadow that is too light isn't earth-shattering, a shadow that is too dark does fall into that category; it's a question of balance. If you're not that sure about CSS Syntax yet, you might want to read it up here before moving on to the code.

      span.button {

      Button Base

    • This is the selector. The dot signifies it is a class selector. Adding span or div before the dot is NOT necessary, but it does help to keep your code in check; just give it enough time and you won't know what in your code is what. But again, it's not necessary, and concering dA journal skins the use is mostly obvious. All that is necessary is a dot and a unique, but easily recognizable selector designation.

      position: relative;

      Button Base

    • The first declaration in this rule. There are several position values, but relative works best in this case. It means that the element - the button - retains its position but can be moved. For example, if you were to add the declaration top: 20px; to the rule, the element would deviate from its normal position by 20px, downwards. We will need the possibility of moving the button a few pixels down in the case of the hover and active state of the button.

      background: linear-gradient(to bottom, #ef9554 0%, #ec7a35 100%);

    • The background property defines the background of an element. It can be a solid color, it can be an image, it can be a linear gradient, like in this case. to bottom defines that the first color hex will be put at the top of the element, and the final color hex at the bottom. The hex codes and percentages inside the brackets work pretty much the same way the gradient tool in Photoshop or Illustrator or GIMP work: The hex defines the color, the percentage the color stop. Here, #ef9554 is set to the position of 0%, and the darker shade is #ec7a35 at 100%. You can put more color stops inbetween. However, keep browser support in mind.

      border-bottom: 1px solid #ef9554 ;

    • Per CSS, you can define a border for your element. Just using the property border will give you an all-around border, while defining the border in question limits the effect to that exact border. For those who haven't mastered the English language yet, border-bottom means that only the lower border is effected, while the upper, the left, and the right remain as is. The pixel value defines the thickness of the border, the second the type of border (there's also dotted, dashed, double, and some more), and the third the color of the border. The way I used it, it is a shorthand property! It is composed of border-width (1px), border-style (solid), and border-color (#ef9554 ).

      border-radius: 5px;

    • border-radius defines the roundness of the borders of an element, which only makes sense when it is relevant (if you can't see it, you don't need it). Here, all four borders are rounded by the same amount in pixels. It's also possible to apply a value to each border individually. These properties go by the rule: border-top-left-radius, border-top-right-radius, border-bottom-right-radius, and border-bottom-left-radius. This is also the order of the shorthand (border-radius: 5px 3px 0px 10px; ). You can also not define a border in the shorthand, so it will use the same value as another border in the short. My shorthand border-radius example says that bottom-right is specified as 0 (zero); if I were to leave it out, the border-bottom-right-radius would be the same as the border-top-left-radius.

      padding: 10px 15px;

    • Padding describes the distance between an element's content and the element's outer border. To clarify: padding is the distance INSIDE of an element. No negative values are possible. Margin is the one that defines the distance between elements outside of the element containing the margin value, where negative values are possible. Do not mix up. You could say I used a short-shorthand in this case. I wanted the padding top and bottom be the same, as well as the padding for right and left. 10px defines both top and bottom, 15px defines both right and left. There is a shorter variant (use only one value for a uniform distance) and a longer variant (use four values for each distance).

      color: #fff ;

    • The color of the font you use for this button. This has no effect on any other text color outside this element. You might be inclined to say, "Well, it is intended to be a hex code, but I know for a fact that a hex has six digits." Yeah. If your hex code looks like #ffffff , you can write #fff and it will be translated correctly as the color white. The first two digits signify the strength of red, the second pair green, the third pair blue (hence RGB). When either of these pairs is the same, you can shorten them into one. BUT it's an all-or-nothing type of shortening. While #ee66bb can be #e6b , #ee66ba cannot be #e6ba .

      font-size: 13pt;

    • The size of the font, obviously. You do not need to use pt, as I have. There are other CSS units you can use, and I want to shed light on one especially: em. 1em is the font-size in use. If you now used 2em to define the font-size of a specific element, it would double. This is very useful in that the font-size isn't set in stone and adapts itself to the basic font-size/font the reader uses. Say that's 13pt. Then 2em would be 26pt. 11pt, 2em would be 22pt. Point being: em is more flexible than most other CSS font units.

      cursor: pointer;

    • Defines the cursor style on hovering your mouse over the button. Pointer is the value used for the hand graphic that usually indicates a link or the like. The standard cursor is auto. You can also implement custom cursors, but a) Internet Explorer is being a bitch about it, and b) describing the go-about of it would go well beyond the tutorial discussion. When defining a cursor, make sure you use those that are supported by every major browser.

      box-shadow: inset 0 20px #f09a5f , inset 0 21px #f2a675 , 0 5px #ca5b19 , 0 7px 2px #999;}

    • This is where most of the magic happens. Let me just say that box-shadow is one awesome feature you can do real cool styling stuff with. A lot of people are of the believe that you can only use one shadow and that this shadow is an outset shadow, probably black; you know, your usual shadow. Well, you see the difference between all the code written so far and adding box-shadow. You can stack several box-shadows, and they don't necessarily have to be outset, which is the standard. In the first line, you can see that I have defined the first box-shadow stack as inset, which means the shadow is directed inward, and is actually being used by me for the highlighting. The second inset is one layer below the first and only covers one pixel a tad lighter for extra detail. After that comes what is responsible for most of the 3D appearance: the "side" of the button, with a darker color. The shadow stacked lowest is the shadow our button throws.
    • box-shadow: x-axis-value | y-axis-value | blur amount | spread amount | color;
      You don't need to use all of these, as I've shown in the above example. But if you want to set the blur amount, you will have to write down x and y as zero (or any value you wish). X and y are mandatory, blur amount and spread are optional. If you want to go all the way through to spread without using x, y, or blur amount, you'll still have to code those in as being zero, or break the shorthand down.

    The base is the heaviest part. The rest is adjusting what you already have, taking some things away and adding a few, mainly editing the box-shadow to fit the new looks of the hover and active states, and moving the button base a few pixels.



    3. Hover and active states


    This is a question of getting from a, the base, to b, the hover state, to c, the active state. To illustrate the point:




    We'll be starting with the hover state of the button. As I said, this is, code-wise, relatively easy. It is more of a design and color question than anything, and understanding what needs to be done in order to achieve the partial push effect for the hover.

      span.button:hover {
    • Whenever you see a colon used in a way similar to this, you are dealing with a pseudo-element. A pseudo-element is called such because it is not an element on itself. It is attached to an already existing element. All code applied to the button base applies to the hover state also. So all we need to do is put new stuff here, or override code lines.

      top: 3px;
    • Since the button is positioned relative, we can move it down 3px for the push effect. Of course it's up to you by how much you move the button, and depends on your button, but keep the box-shadow in mind. It will need to be overriden to help the push-look along, or else the box-shadow will simply be moved down.

      box-shadow: inset 0 20px #f09a5f , inset 0 21px #f2a675 , 0 2px #ca5b19 , 0 3px 2px #999;}
    • As you can see, the first two layers, the highlights, are left untoched. However, I decreased the "side", the third layers, by the amount I have moved the button down: 3px. Since the button is now closer to the background, the shadow needs to be adjusted to be thinner. I chose to decrease the y-axis value by 5px, but keep the blur amount.


    Hover over me!




    The next and final step is the active state. This is the state you'll get to see when you click on the button.

      span.button:active {
    • Another pseudo-element. With this one, you control how, usually a link, but in essence everything you want to, reacts when a user clicks it. Here, too, we'll only change the placement as well as the box-shadow to give a neat pushed look.

      top: 5px;
    • If you want to read about top, look up what I wrote in the hover state description. It's all the information you need in this case.

      box-shadow: inset 0 0 0 1px #ca5b19 , inset 0 20px #f09a5f , inset 0 21px #f2a675 ;}
    • You'll see that there have been some changes to the order of the box-shadows, and that there are three, not four. Since the button is pushed inside, there is no more need for an outer shadow or what our eyes perceived as being a side of the button. The first value is a 1px spread without any blur to achieve a darker, inner border. It had to be put before the highlights, because they are inset, too, and would have hidden the upper part of the border. Don't forget the rule: top to bottom. First equals first layer, second equals one layer below the first layer, and so on.


    Click me!


    And that, ladies and gentlemen, is a perfectly pushable button. Enjoy the clicking orgy. I sure do.






    Let's code!: Background Properties | CSS Progress Bar | The Perils of !important | Pushable Buttons | More...
    Quick Info Fix: CSS Syntax | CSS: Thoughts on Shorthand | CSS: Element Positioning | CSS: On Nesting
    Journal Skins: Raspberry Smooth | Cream and Black | That Girl With The Flower | Dragon Age: Grey Wardens

    Related content
    Comments: 61

    ArtistiaCons [2020-01-02 18:51:25 +0000 UTC]

    This is actually very helpful. I didn't know if you would break every little detail together, it doesn't seem so hard to code than you would first think it is to be.

    I gladly appreciate that this would help me in the works of coding, as I really want to learn how to code better(but as stated in your description, I won't be using this for buttons as far as how everyone likes to use it to their advantage). I will be taking this as a sign of coding that will help me better into learning how to make my own code ^^

    πŸ‘: 0 ⏩: 0

    pastelmagma [2019-07-22 15:55:02 +0000 UTC]

    My issue is I have no idea how to put CSS on deviantart. And my that i mean, i have added a custom widget to my profile page. How do I put this code into that custom widget to make this button appear, because rn when I ry to do that the code itself is all you see. I've wanted to make buttons for ages but that one hurdle, nobody ever describes. It's like we're all supposed to just magically know how its done and that barrier of entry sucksΒ 

    πŸ‘: 0 ⏩: 0

    gdpr-40292115 [2018-01-30 01:08:46 +0000 UTC]

    How do I put this in my profile

    πŸ‘: 0 ⏩: 1

    pastelmagma In reply to gdpr-40292115 [2019-07-22 15:56:30 +0000 UTC]

    my exactly question

    πŸ‘: 0 ⏩: 0

    splat-cat927 [2017-09-03 07:13:44 +0000 UTC]

    Does any of this still work for non-core people?

    πŸ‘: 0 ⏩: 1

    Celvas In reply to splat-cat927 [2017-12-18 22:28:08 +0000 UTC]

    As far as I am aware, none of this ever worked for non-core members. Sorry.

    πŸ‘: 0 ⏩: 1

    canttel In reply to Celvas [2018-07-10 02:57:38 +0000 UTC]

    it does

    πŸ‘: 0 ⏩: 0

    emocx [2017-07-13 20:50:12 +0000 UTC]

    ahh! I was searching for this since I made a comeback from long hiatus~!
    (inactive since june 2014 & made a comeback in may 2017)
    mustΒ  Β so this tutorials wont go anyway

    πŸ‘: 0 ⏩: 0

    Trillo-Lillo [2015-02-16 01:58:04 +0000 UTC]

    this is very nice! I read it, and I was wondering, does this work in deviantart journal css??? and if it does, where do I put it? I'm confused

    πŸ‘: 0 ⏩: 1

    Celvas In reply to Trillo-Lillo [2015-02-16 22:52:22 +0000 UTC]

    Yes, it does. If you don't know how to implement it, maybe it would be best if you first read about CSS fundamentals. You can create journal skins on deviantART via the editor; you can find it where you change your journal design. There is no definite hierarchy outside of a CSS rule. Basically, you could style the header but put the code at the end. Knowing the syntax would be a good first start.

    πŸ‘: 0 ⏩: 1

    Trillo-Lillo In reply to Celvas [2015-02-17 05:13:12 +0000 UTC]

    thanks for answering!! I've been experimenting with css and this "how to create a button" helped me a lot!!

    thank you so very much! you're awesome!

    πŸ‘: 0 ⏩: 1

    Celvas In reply to Trillo-Lillo [2015-02-17 05:24:34 +0000 UTC]

    I'm happy to hear that. Should you have more specific question, I would gladly provide you with answers. Check out w3schools if you haven't already. Makers of CSS, worth a look. They have great documentation, explanation, even samples you can play around with.

    And I'm not that awesome actually. I just really enjoy box-shadow.

    πŸ‘: 0 ⏩: 0

    123artpunk [2015-01-05 14:17:51 +0000 UTC]

    I tried to read your coding tutorial for buttons......but im toooo tired...i really kneed to sleep........yaawwn!
    Id like to learn one of the languages.............ummmm i cant remember the name......not basic....or python......or...or ruby...…uuugh!
    Well anyways id likie to build a little robot.........id like to use Γ n arduino for somne art projects......ever read make magazine?

    πŸ‘: 0 ⏩: 0

    kuredesu [2014-05-27 12:51:37 +0000 UTC]

    oh my. perfect! Just the thing I am looking for!
    Thank you!!

    πŸ‘: 0 ⏩: 1

    Celvas In reply to kuredesu [2014-05-27 13:23:14 +0000 UTC]

    Thank you. I would like to point out, however, that you can add transitions to make the "animation" more fluent. Like, for example, adding the bit

    transition: all 0.3s ease;

    -> "all" can also be a specific declaration (background-image, opacity, etc.).
    -> "0.3s" is the time the transition will need to execute (300ms would also work just fine as a value; it's the same thing, only not decimal).
    -> "ease" is the property.
    -> There's still more to it, so if you're interested at all, read this.

    to the button's normal state style. I haven't tried that one out, yet, to be honest - not with buttons at least - but I'll still say this in case you'd want to play around with it.

    πŸ‘: 0 ⏩: 1

    kuredesu In reply to Celvas [2014-05-27 23:17:55 +0000 UTC]

    thanks very much! I'll be playing with these later on!

    πŸ‘: 0 ⏩: 0

    Rinku-ART [2014-04-12 22:29:06 +0000 UTC]

    Wow wow wow I didn't know abot making buttons in CSS Its pure magic Wow!
    Thanks for this!
    That's pity we can't use CSS in custom boxes on DA :c

    πŸ‘: 0 ⏩: 1

    Celvas In reply to Rinku-ART [2014-04-12 23:45:33 +0000 UTC]

    Thank you! I'm really happy to read this kind of comment. box-shadow is one hell of a thing, isn't it?

    AND you can do it. Take a look at my profile. You just have to use favourite deviation widgets.

    πŸ‘: 0 ⏩: 2

    Machina-Su In reply to Celvas [2015-08-26 16:55:19 +0000 UTC]

    hello ! i'm very interested in making an image change when the mouse goes over it (with mouseover) but, how can I make it in the favorite deviation widget ? there are no css ?

    πŸ‘: 0 ⏩: 1

    Celvas In reply to Machina-Su [2015-08-26 22:30:08 +0000 UTC]

    You need to make a journal skin, assign it to a document, and make that your favorite deviation to have it show up in that box.

    πŸ‘: 0 ⏩: 1

    Machina-Su In reply to Celvas [2015-08-26 23:25:15 +0000 UTC]

    yes ! thank you ! i've finally found the answer ! thank you ! ^^i'm going to create my own journal skin (let's cooode ! XD) Thanks !

    πŸ‘: 0 ⏩: 0

    Rinku-ART In reply to Celvas [2014-04-13 14:05:32 +0000 UTC]

    Yeah, I know but I meanΒ directly codes css egΒ colorful lettering in color html and not by a journal.

    πŸ‘: 0 ⏩: 1

    Celvas In reply to Rinku-ART [2014-04-13 14:20:11 +0000 UTC]

    I know what you mean, but you're limited to the color codes deviantART itself uses. So it's either journal skins or being content with having a very limited selection. That's why I said fav deviation widget; it's no use complaining.

    πŸ‘: 0 ⏩: 0

    CapedFox [2014-03-06 05:11:26 +0000 UTC]

    can you post the code? thanks

    πŸ‘: 0 ⏩: 1

    Celvas In reply to CapedFox [2014-03-06 05:51:38 +0000 UTC]

    This is a tutorial, not a resource. Nevertheless, had you read the tutorial, you would have found that the code is right in there.

    πŸ‘: 0 ⏩: 1

    CapedFox In reply to Celvas [2014-03-07 01:30:14 +0000 UTC]

    ok then

    πŸ‘: 0 ⏩: 0

    nedyku [2014-01-02 17:06:13 +0000 UTC]

    This has been very helpful and i have learned a few things about CSS. However, could you give me a code where i can past the URL or the button picture into it? It would help a lot.

    πŸ‘: 0 ⏩: 1

    Celvas In reply to nedyku [2014-01-02 18:28:53 +0000 UTC]

    Happy to help. The button is no image, though. The button is all CSS. And the code is right there in the tutorial.

    πŸ‘: 0 ⏩: 1

    nedyku In reply to Celvas [2014-01-02 18:54:10 +0000 UTC]

    Ohh. I thought you needed to make several images to put into the CSS. Also, do i put in all the code in my custom box?

    πŸ‘: 0 ⏩: 1

    Celvas In reply to nedyku [2014-01-02 18:55:01 +0000 UTC]

    Your custom box? As in custom box on your profile page? You cannot use CSS with that.

    πŸ‘: 0 ⏩: 1

    nedyku In reply to Celvas [2014-01-02 18:58:46 +0000 UTC]

    ohh, i cant? Oh well then. I was hoping to put buttons with links to my gallery and commissions info and stuff like that. Do you know were i can fins something like that? I know it exists because it's on =Kawiku 's page. Just wondering. You don't need to search for me. I just want to know if you know of a tutorial or something.

    πŸ‘: 0 ⏩: 1

    Celvas In reply to nedyku [2014-01-02 19:03:15 +0000 UTC]

    I can do you one better. %CustomizeYourProfile is THE go-to group for stuff profile page related. Have a look through their gallery.

    πŸ‘: 0 ⏩: 1

    nedyku In reply to Celvas [2014-01-02 19:04:03 +0000 UTC]

    Thx so much!

    πŸ‘: 0 ⏩: 0

    GeoCaecias [2013-11-20 03:20:41 +0000 UTC]

    This is so great. ;o; Β Thank you for sharing your knowledge with the rest of us!!

    πŸ‘: 0 ⏩: 1

    Celvas In reply to GeoCaecias [2013-11-20 09:13:06 +0000 UTC]

    You're welcome. I am happy to provide help and insight however I can, and it's really cool for me that what I do appears to be perceived as helpful. I'll keep the tutorials and quick fixes coming, I can promise you that much. Lovely comments like yours make it all worthwhile.

    πŸ‘: 0 ⏩: 0

    TehAngelsCry [2013-11-18 14:41:51 +0000 UTC]

    This has taken me too long to reply XD But I love this! It's so detailed

    πŸ‘: 0 ⏩: 1

    Celvas In reply to TehAngelsCry [2013-11-18 14:48:20 +0000 UTC]

    Thank you. It's really kind of impressive when you go from all the lines of code to the box-shadow. It's a world of difference in appearance, no? It's so totally cool what you can do with it. That's why I put the tooltips in: to show how each property affects the outcome, and just how much box-shadow factors into the awesome.

    πŸ‘: 0 ⏩: 1

    TehAngelsCry In reply to Celvas [2013-11-18 15:19:51 +0000 UTC]

    It really is crazy how much one little element can add! I hadn't even noticed the arrows popped up to show you how it looks! That's really neat

    πŸ‘: 0 ⏩: 0

    KaraSkakalac [2013-11-18 04:11:27 +0000 UTC]

    Have I ever told you I loved you?



    Not to be awkward, but this is really awesome thank you so much for the great tutorial

    πŸ‘: 0 ⏩: 1

    Celvas In reply to KaraSkakalac [2013-11-18 06:30:17 +0000 UTC]

    Nope. But there's a first time for everything. By all means, keep the love coming. (has invested points in Awkward, too. )
    Hehe. Anyway. Happy you like it so much and I hope it will be of use to you in your future endeavors.

    πŸ‘: 0 ⏩: 0

    PistachioInfernal [2013-11-16 14:42:44 +0000 UTC]

    Great tutorial!

    πŸ‘: 0 ⏩: 1

    Celvas In reply to PistachioInfernal [2013-11-16 15:02:58 +0000 UTC]

    Thank you very much!

    πŸ‘: 0 ⏩: 0

    illusivereality [2013-11-16 10:07:45 +0000 UTC]

    It's also possible to keep button text from being selectable in most browsers:

    {
    Β  -webkit-touch-callout: none;
    Β  -webkit-user-select: none;
    Β  -khtml-user-select: none;
    Β  -moz-user-select: none;
    Β  -ms-user-select: none;
    Β  user-select: none;
    }

    ... but as you can see, it's not official CSS. It's probably not part of the standard because derpy people would attempt to use it to try and prevent people from stealing text they wrote and generally break the internet.

    πŸ‘: 0 ⏩: 1

    Celvas In reply to illusivereality [2013-11-16 15:02:48 +0000 UTC]

    This is cool for the sole effect, but has no functional value. I might have added, but the tutorial was long enough as it is, and I like to stay with code that can be used under the limitations of deviantART. But thank you for your comment.

    πŸ‘: 0 ⏩: 1

    illusivereality In reply to Celvas [2013-11-16 21:51:03 +0000 UTC]

    Sure thing. Your tutorial is awesome as is. I didn't mean to imply that you forgot something, or left something out.

    πŸ‘: 0 ⏩: 1

    Celvas In reply to illusivereality [2013-11-16 23:36:25 +0000 UTC]

    Didn't take it as such. It's a good tipp. Button text is nothing you necessarily want to be selected when you click on the damn thing.

    πŸ‘: 0 ⏩: 0

    Rumokiga [2013-11-16 09:47:11 +0000 UTC]

    That is very useful information! Thanks for taking the time to write this tutorial! ^^
    and omg I love the tooltip+arrow you put next to the CSS properties!

    πŸ‘: 0 ⏩: 1

    Celvas In reply to Rumokiga [2013-11-16 15:00:33 +0000 UTC]

    Thank you. And I mean THANK YOU. Those tool tips took ten years out of my life, can you believe it. I really, totally, absolutely LOVE that you mention noticing them. You are a wonderful person. And sure! I am a big fan of writing tutorials about stuff I know, and it is really nice to know something that other people find useful.

    πŸ‘: 0 ⏩: 1

    Rumokiga In reply to Celvas [2013-11-17 17:33:25 +0000 UTC]

    Ohhh what a heartwarming comment! You're very welcome! Thanks again for spending so much time on the tutorial and the tooltips and for delivering such a great final result ^^

    πŸ‘: 0 ⏩: 0

    GinkgoWerkstatt [2013-11-16 06:51:53 +0000 UTC]

    Very good tutorial! And useful for a lot of people

    πŸ‘: 0 ⏩: 1


    | Next =>