Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I need some CSS help
#1
Well, I'm attempting to use a custom font on a website I'm coding, but its not working. I've Googled it, and got this code, which apparently isn't working.

Code:
@font-face
{
font-family: Blocky;
src: url('Blocky.eot');
src: local(Blocky), url('Blocky.ttf') format('truetype');
}

The font is called "Blocky" and everything is located in the same directory at the moment.
Reply
#2
http://return-true.com/2010/05/css-3-cus...font-face/

That might help a little bit.
[Image: AmZJnA9.png]
Reply
#3
(08-06-2011, 07:55 PM)Paradox Wrote: Well, I'm attempting to use a custom font on a website I'm coding, but its not working. I've Googled it, and got this code, which apparently isn't working.

Code:
@font-face
{
font-family: Blocky;
src: url('Blocky.eot');
src: local(Blocky), url('Blocky.ttf') format('truetype');
}

The font is called "Blocky" and everything is located in the same directory at the moment.

I don't know a lot about web development or CSS, but I can give you a few tips and some feedback.

First of all, I've never seen CSS that looks like that. Your code is all over the place. Please see www.tizag.com for advice on CSS syntax, because that is definitely not the correct syntax for CSS... at least not from the past few years.

Secondly, I'm pretty sure that the "@" symbol that you put in front of your CSS class name is invalid. I recommend that you use the "#" symbol.

Finally, I don't know why you have two "src:"'s in your CSS class. Is that proper syntax?

Sorry I can't tell you more than I know.

EDIT: I think that Glome can help you more than I can with CSS. The page he supplied showed that the "@" symbol is apparently the proper choice for what you are doing. My bad.
-CoderRyne
Ryne Thiel
Reply
#4
(08-06-2011, 08:04 PM)CoderRyne Wrote: First of all, I've never seen CSS that looks like that. Your code is all over the place. Please see www.tizag.com for advice on CSS syntax, because that is definitely not the correct syntax for CSS... at least not from the past few years.

Well, This is how I write CSS, which works.

Code:
.center
{
text-align:center;
}
h1
{
color:black;
text-align:center;
font-family:"Blocky";
font-size:50px;
}
p
{
font-family:"Blocky";
font-size:15px;
}
Reply
#5
Wait I just remembered that what you're doing is CSS3 and some stuff in CSS3 isn't supported in all browsers.

Can you please tell me what browser you are using and then show me the websiteyou're using the CSS on?
[Image: AmZJnA9.png]
Reply
#6
(08-06-2011, 08:20 PM)Glome Wrote: Wait I just remembered that what you're doing is CSS3 and some stuff in CSS3 isn't supported in all browsers.

Can you please tell me what browser you are using and then show me the websiteyou're using the CSS on?

Chrome
http://cub3studios.x10.mx/index.html
(Btw, I'm using x10 temporarily until I find a good host)
Reply
#7
(08-06-2011, 08:24 PM)Paradox Wrote:
(08-06-2011, 08:20 PM)Glome Wrote: Wait I just remembered that what you're doing is CSS3 and some stuff in CSS3 isn't supported in all browsers.

Can you please tell me what browser you are using and then show me the websiteyou're using the CSS on?

Chrome
http://cub3studios.x10.mx/index.html
(Btw, I'm using x10 temporarily until I find a good host)

x10hosting is a wonderful free web host. I haven't found a better one yet.
[Image: AmZJnA9.png]
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)