Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New Coder
    Join Date
    Oct 2011
    Posts
    85
    Thanks
    13
    Thanked 1 Time in 1 Post

    a few simple problems

    I have a few css problems, (all things I've done before, but I've been staring at lease for hours so I'm giving up and I need some help)

    neither of these things work
    Code:
    @font-face {
        font-family: 'League';
        src: url('/fonts/League_Gothic.otf');
    	src: url('/fonts/League_Gothic.eot');
    	src: url('/fonts/League_Gothic.eot') format('embedded-opentype');
    	src: url('/fonts/League_Gothic.woff') format('woff');
    	src: url('/fonts/League_Gothic.ttf') format('truetype');
    	src: url('/fonts/League_Gothic.svg#svgLeague_Gothic') format('svg');
    	font-weight: normal;
    	font-style: normal;
    
    }
    
    header nav a{
    	font-family:'League', Arial, Helvetica, sans-serif;
    	text-decoration:none;
    	font-size:48px;
    	color:@blue;
    }
    Code:
    border-top-image: url(/images/vertical_border.png) 0 repeat-y;
    Thanks for the help, I am totally stuck

    I checked the links. they work, but the font doesn't show up
    and the border-top-image doesn't show either
    Last edited by footballer27; 07-29-2012 at 04:04 PM.

  • #2
    Senior Coder coothead's Avatar
    Join Date
    Jan 2004
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    1,700
    Thanks
    0
    Thanked 233 Times in 228 Posts
    Hi there footballer27,

    a link to the problematic site might prove helpful.

    coothead

  • #3
    Senior Coder
    Join Date
    Sep 2010
    Posts
    1,993
    Thanks
    15
    Thanked 233 Times in 233 Posts
    I've found on my pages that the browser doesn't like quotes around the URL.
    src: url('/fonts/League_Gothic.eot'); maybe should be
    src: url(/fonts/League_Gothic.eot);

    But where you put the @font-face entry is important too. It should be at the very top of the page BUT you can include an @import css link above it if need be. I know it's confusing but there doesn't seem to be an absolute rule, you just have to try things.

  • #4
    New Coder
    Join Date
    Oct 2011
    Posts
    85
    Thanks
    13
    Thanked 1 Time in 1 Post

  • #5
    Senior Coder coothead's Avatar
    Join Date
    Jan 2004
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    1,700
    Thanks
    0
    Thanked 233 Times in 228 Posts
    Hi there footballer27,

    The font names in your css do not match those in the fonts folder.

    Also some of them may be corrupted.

    I would suggest that your replace your fonts folder with the one in the attachment and use this css instead...
    Code:
    @font-face {
        font-family:'League';
        src:url('/fonts/league_gothic.eot');
        src:url('/fonts/league_gothic.eot?#iefix') format('embedded-opentype'),
    	url(/'fonts/league_gothic.woff') format('woff'),
    	url('/fonts/league_gothic.ttf') format('truetype'),
    	url('/fonts/league_gothic.svg#svgLeague_Gothic') format('svg');
    	font-weight:normal;
    	font-style:normal;
    }
    
    coothead
    Attached Files Attached Files

  • Users who have thanked coothead for this post:

    footballer27 (07-29-2012)

  • #6
    New Coder
    Join Date
    Oct 2011
    Posts
    85
    Thanks
    13
    Thanked 1 Time in 1 Post
    thank you, your solution was very close. I added ../ before the urls. (I know that shouldn't matter but whatever, it somehow did). Now I'm still stuck on the border-top-image

    Code:
    border-top-image: url(/images/vertical_border.png);
    nevermind. thanks anways. I don't need this now
    Last edited by footballer27; 07-30-2012 at 01:55 AM.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •