Using CSS file with custom font?

Just started using Construct 2? Post your questions here

Post » Wed Aug 26, 2015 5:23 am

can someone tell me how I can fix this .css file

Code: Select all
#MYCSS{
   @font-face {
      font-family: 'phaser_bankregular';
      src: url('phaserbank.eot');
      src: url('phaserbank.eot?#iefix') format('embedded-opentype'),
          url('phaserbank.woff2') format('woff2'),
          url('phaserbank.woff') format('woff'),
          url('phaserbank.ttf') format('truetype'),
          url('phaserbank.svg#phaser_bankregular') format('svg');
      font-weight: normal;
      font-style: normal;
   }
   color: #4CFF00 !important;
   font-size: 16px;
   padding: 8px 32px;
   border: 2px solid #4CFF00;
   background: #000000;
   background: linear-gradient(top,  #000000,  #000000);
   background: -ms-linear-gradient(top,  #000000,  #000000);
   background: -webkit-gradient(linear, left top, left bottom, from(#000000), to(#000000));
   background: -moz-linear-gradient(top,  #000000,  #000000);
}
#MYCSS:hover{
   color: #FFFFFF !important;
   background: #000000;
   background: linear-gradient(top,  #000000,  #000000);
   background: -ms-linear-gradient(top,  #000000,  #000000);
   background: -webkit-gradient(linear, left top, left bottom, from(#000000), to(#000000));
   background: -moz-linear-gradient(top,  #000000,  #000000);
}


I am using a custom font but it doesn't seem to work
B
14
S
6
G
1
Posts: 150
Reputation: 1,987

Post » Thu Aug 27, 2015 12:11 am

Edited
I fixed the custom font and the outline problem but..
I seem to not be able to make the button be affected by any padding change
also I can't seem to shrink the box at all without offsetting its position
I used
Code: Select all
@font-face {
   font-family: 'phaser_bankregular';
   src: url('phaserbank.eot');
   src: url('phaserbank.eot?#iefix') format('embedded-opentype'),
       url('phaserbank.woff2') format('woff2'),
       url('phaserbank.woff') format('woff'),
       url('phaserbank.ttf') format('truetype'),
       url('phaserbank.svg#phaser_bankregular') format('svg');
   font-weight: normal;
   font-style: normal;
}

#MYCSS{
       font-family: 'phaser_bankregular';
   outline:none;
   color: #4CFF00 !important;
   font-size: 16px;
   padding: 0px 0px;
   border: 2px solid #4CFF00;
   background: #000000;
   background: linear-gradient(top,  #000000,  #000000);
   background: -ms-linear-gradient(top,  #000000,  #000000);
   background: -webkit-gradient(linear, left top, left bottom, from(#000000), to(#000000));
   background: -moz-linear-gradient(top,  #000000,  #000000);
}
#MYCSS:active{
       font-family: 'phaser_bankregular';
   outline:none;
   color: #4CFF00 !important;
   font-size: 16px;
   padding: 10px 10px;
   border: 2px solid #4CFF00;
   background: #000000;
   background: linear-gradient(top,  #000000,  #000000);
   background: -ms-linear-gradient(top,  #000000,  #000000);
   background: -webkit-gradient(linear, left top, left bottom, from(#000000), to(#000000));
   background: -moz-linear-gradient(top,  #000000,  #000000);
}

}
B
14
S
6
G
1
Posts: 150
Reputation: 1,987

Post » Sun Aug 30, 2015 9:38 pm

I guess #MYCSS is the ID of your button ?
Try to put display: inline-block or display: block in your css.
Also no need to write twice your padding values as they are identical.
padding: 10px 10px is the same as padding: 10px.
B
12
S
7
G
7
Posts: 450
Reputation: 4,276

Post » Sun Aug 30, 2015 10:31 pm

nope it still seems to only change the padding's bottom and right
I am going for a shrink of all four sides when you click
B
14
S
6
G
1
Posts: 150
Reputation: 1,987

Post » Sat Sep 05, 2015 5:41 am

bump
more problems
scrolling bars seems to have graphical problems with css
dropdownlist's actual dropdown bar's borders can't be customized
B
14
S
6
G
1
Posts: 150
Reputation: 1,987

Post » Sat Sep 05, 2015 8:18 am

Can you provide a link to your .capx file ?
B
12
S
7
G
7
Posts: 450
Reputation: 4,276

Post » Mon Sep 07, 2015 11:08 pm

I can make a example .capx
Here

Basically the stuff isn't being effected by the css all the way
some of it seems to still be white
B
14
S
6
G
1
Posts: 150
Reputation: 1,987

Post » Fri Sep 11, 2015 4:14 am

@Coin-coin le Canapin

you there I posted the capx example
B
14
S
6
G
1
Posts: 150
Reputation: 1,987

Post » Tue Oct 13, 2015 3:16 am

Coin-coin le Canapin wrote:Can you provide a link to your .capx file ?


I did you still haven't replied
B
14
S
6
G
1
Posts: 150
Reputation: 1,987


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 1 guest