css issue
css issue
I have recently started of an old web site project ive had laying around for while and i ran into some issues with this CSS thinghy .
Issue no 1
the font i whant to use for my site
is Vivaldi it works on my box but no one elses?
Ive done some reading about the @font-face but still i can't get it to work properly...
Issue no 2
my menu is written in css and the thing is everything floats to the left and i whant my menu entries to be centered.... and i can't figure out how to fix this
css file
http://code.suck-o.com/42477
regards @cwDYKARN
Issue no 1
the font i whant to use for my site
is Vivaldi it works on my box but no one elses?
Ive done some reading about the @font-face but still i can't get it to work properly...
Issue no 2
my menu is written in css and the thing is everything floats to the left and i whant my menu entries to be centered.... and i can't figure out how to fix this
css file
http://code.suck-o.com/42477
regards @cwDYKARN
- bad_brain
- Site Owner
- Posts: 11636
- Joined: 06 Apr 2005, 16:00
- 19
- Location: In your eye floaters.
- Contact:
Re: css issue
not having the time to really check it at the moment, but for #1:
where is the part in the CSS for that font? can't find it in the linked paste..
where is the part in the CSS for that font? can't find it in the linked paste..
Re: css issue
i forgot to link it xD
This is the font "decleration" and is embedded directly whit in the html
This is the font "decleration" and is embedded directly whit in the html
Code: Select all
<head>
<style>
@font-face { font-family: vivaldi; src: url('font/Vivaldi.ttf');}
@font-face { font-family: vivaldi; font-weight: bold; src: url('font/Vivaldi.ttf');}
h1 {font-family:vivaldi;}
h2 {font-family:vivaldi;}
h3 {font-size:25px;text-align: justify;color:#fff; font-family:vivaldi;}
p {font-size:16px;text-align: justify;color:#fff; font-family: "Comic Sans MS", cursive, sans-serif;}
</style>
</head>
Re: css issue
Regarding the font issue. Did you upload the font to the server?
http://www.zenelements.com/blog/css3-embed-font-face/
This article explains how to use the font face method
Also
regarding the alignment try this to align to the center
*cheers
http://www.zenelements.com/blog/css3-embed-font-face/
This article explains how to use the font face method
Also
regarding the alignment try this to align to the center
Code: Select all
margin-left: auto;
margin-right: auto;
Re: css issue
yep the font is in
Code: Select all
wwwroot/font/Vivaldi.ttf
- bad_brain
- Site Owner
- Posts: 11636
- Joined: 06 Apr 2005, 16:00
- 19
- Location: In your eye floaters.
- Contact:
Re: css issue
IF the .ttf is uploaded: sure the path is right? because that way only files one directory above the font one can load it. I usually set it like ../../../../../font/file.ttf then, just to be on the safe side (assuming the server settings are secure, don't allow cd out of the htroot, and when done simply ignore the additional ../).
P.S. also try to explicitly set the format:
also notice IE don't accept ttf, you might have to use eot format instead.
P.S. also try to explicitly set the format:
Code: Select all
src: url('font/Vivaldi.ttf') format('truetype');
Re: css issue
The complete path to font C:\inetpub\wwwroot\font\Vivaldi.ttf
The complete path to index C:\inetpub\wwwroot\index.html
iam on the hunt for the .eot or .woff format atm
setting the format explicitly to format('truetype'); dident work
btw i figured out how to center the menu
The complete path to index C:\inetpub\wwwroot\index.html
iam on the hunt for the .eot or .woff format atm
setting the format explicitly to format('truetype'); dident work
btw i figured out how to center the menu
Code: Select all
#cssmenu > ul
{
list-style:inside none;
padding:0;
margin:0;
position:relative;
left: 50%;
text-align:center;
clear:left;
float:left;
}
#cssmenu > ul > li
{
list-style:inside none;
padding:0;
margin:0px auto;
float:left;
display:block;
position: relative;
right: 50%;
text-align:center;
clear:right;
}
Re: css issue
i figured out what i did wrong with the font
i hade to set the font-family: to itc and i cleaned it up abit
Thank you very much BB and Mabo
ill dump the final result if someone runs in to the same issue
css
html
Regards @cwDYKARN^^
i hade to set the font-family: to itc and i cleaned it up abit
Thank you very much BB and Mabo
ill dump the final result if someone runs in to the same issue
css
Code: Select all
/*Import font here*/
@font-face {
font-family: itc;
src: url('font/Vivaldi.ttf') format('truetype');
}
/*end*/
.banner{
background-color:#486e83;
}
.banner h1{
border:0px;margin:0px;padding:0px;
text-align:center;
text-indent:0px;
font-size:70px;
line-height:69px;
font-family:vivaldi;
color:#fff;
font-weight:bold;
text-shadow:4px 3px 10px #000;
}
.banner h2{
border:0px;margin:0px;padding:0px;
text-align:center;
text-indent:0px;
font-size:20px;
line-height:18px;
font-family:vivaldi;
color:#fff;
font-weight:bold;
text-shadow: 4px 3px 10px #000;
}
Code: Select all
<div class="banner" style="padding:20px;">
<h1 id="logo1">Text Text Text</h1>
<h2 id="logo2">Stuff Stuff Stuff</h2>
</div>
- bad_brain
- Site Owner
- Posts: 11636
- Joined: 06 Apr 2005, 16:00
- 19
- Location: In your eye floaters.
- Contact:
Re: css issue
good work man!