The Joyent Community

A place where the Joyent community can gather, help each other out, and stay informed.

You are not logged in.

  • Index
  •  » sIFR
  •  » Space is turning font bigger!

#1 2006-01-10 14:28:29

webhamster
New member
Registered: 2005-11-24
Posts: 11
Expertise

Space is turning font bigger!

Hi,

i made a menu using SIFR.

It's pretty simple:

<span class="menu"><a href="link1.html">Link1</a><br /></span>
<span class="menu"><a href="link2.html">Link2</a><br /></span>
<span class="menu"><a href="link3.html">Link3</a><br /></span>
<span class="menu"><a href="link....html">Link...</a><br /></span>

The class menu is replaced by by the font 'Kindergarten' using SIFR.
Working well, except.....

When i'm using a SPACE in my menu, the specific menuitem will turn up BIGGER!

<span class="menu"><a href="link1.html">Link1</a><br /></span>
<span class="menu"><a href="link2.html">Link2</a><br /></span>
<span class="menu"><a href="link3.html">Link 3</a><br /></span>

Link1 en Link2 would go well, but Link 3 won't. Link 3 turns bigger then the rest.
I played with line-height, word spacing, letter spacing etc in the decoy style, but no succes.

So when i use a space it will ruin that specific menuitem. Is this a bug in SIFR?
Or am i the bug?

Nick

[update]
i solved the 'problem'. When I replace

<span class="menu"><a href="link2.html">Link2</a><br /></span>

with

<span class="menu"><a href="link2.html">Link2</a></span>

(without BR within the span) it goes well. Is this a bug of SIFR?
[/update]

Offline

 

#2 2006-01-10 14:58:41

webhamster
New member
Registered: 2005-11-24
Posts: 11
Expertise

Re: Space is turning font bigger!

AAAAA new problem:

i think the decoy style is bigger (wider) then the 'normal' style. So the decoy style will reach the and of a colomn (td) and will breake and the text will appear on two lines. How can i fix this? I tried to tune it but it didn't work. Am I something doing wrong?

Last edited by webhamster (2006-02-16 14:09:30)

Offline

 

#3 2006-01-10 15:23:56

Mark Wubben
sIFR dev
From: Copenhagen
Registered: 2004-08-17
Posts: 6271
Website  Expertise

Re: Space is turning font bigger!

This is not a bug of sIFR. When you add the line-break the span becomes higher, and more room is given to the text. Also, without a live page I can't be of much help.


"The angels stole my phone box" – The Tenth Doctor

Offline

 

#4 2006-01-10 15:28:59

webhamster
New member
Registered: 2005-11-24
Posts: 11
Expertise

Re: Space is turning font bigger!

why would a line with a linebreak be higher? But i solved the linebreak problem (by placing them outside the by sifr replaced tag) but could you have a look and my 'new' problem. It's really giving me a headdeack, for 3 hours long!

Last edited by webhamster (2006-02-16 14:09:06)

Offline

 

#5 2006-01-10 21:32:07

Mark Wubben
sIFR dev
From: Copenhagen
Registered: 2004-08-17
Posts: 6271
Website  Expertise

Re: Space is turning font bigger!

The line-break makes the element higher. sIFR takes the height and width of the element to determine the font size. Thus, if the element is higher, the font size will be larger. If you look at the site in debugging mode, you'll see that the "vraag en antwoord" text takes up two lines the way it is currently styled. You'll have to make it smaller to prevent the line-wrap (or you could increase the size of the menu).

I'd suggest you read the documentation a bit more to understand how sIFR works. And actually, I believe images would do just fine for a menu like this, as the text isn't very likely to change and using sIFR for links is discouraged.


"The angels stole my phone box" – The Tenth Doctor

Offline

 

#6 2006-01-10 21:45:50

webhamster
New member
Registered: 2005-11-24
Posts: 11
Expertise

Re: Space is turning font bigger!

i read the documentations pretty well. As I told you, the linebreak problem is solved.

First i'm gonna tell you WHY i'm using SIFR instead of images. It's simple, i'm doing a lot of SEO (search engine optimalization) and it's important the important words are shown as text, and not as an image. Google (or any other searchegine) can't read images, but can read text. Thats why I use SIFR also for the menu.
That said:

My problem is this, i have an text 'Vraag en antwoord' but SIFR puts an canvast around which is MUCH bigger, i'll try to illustrate:

+---+

| | = canvas made by SIFR (i think you call it a decoy style)
+---+

+-------------------------------------+

| vraag en antwoord |
+-------------------------------------+

why is the canvas SO BIG? And not like this (see screenshot first post):

+-----------------------+

| vraag en antwoord |
+-----------------------+

The last option WOULD fit into the menu, but the first one (with al the extra space to the right) NOT.
So HOW do I get the decoy style or the canvas (or however you name it) just as WIDE as the text self?

Thanks for your time!

Nick

PS. wat doen we moeilijk, ik zie dat jij ook uit Enschede komt?

Last edited by webhamster (2006-01-10 21:46:46)

Offline

 

#7 2006-01-10 22:14:34

Mark Wubben
sIFR dev
From: Copenhagen
Registered: 2004-08-17
Posts: 6271
Website  Expertise

Re: Space is turning font bigger!

sIFR takes the width of the element you are replacing. If the element is too wide, so will be sIFR. You can fix this by changing the CSS so it's not as wide anymore. That's all I can say! :)

Also, I believe Google reads alt text, so it's not needed to use sIFR as long as you specify the alt text on the images.

(NL: Laten we het Engels houden voor anderen)


"The angels stole my phone box" – The Tenth Doctor

Offline

 

#8 2006-01-10 22:23:56

webhamster
New member
Registered: 2005-11-24
Posts: 11
Expertise

Re: Space is turning font bigger!

Mark, if i'm not using SIFR the elements are just fine. I can give them a background color, and the width of the text is the same background. How can it be that SIFR is just too wide? It's irritating, SIFR is realy good, but their are a lot of thinks that have not been documented or not have been explained...IMAGINE if you can use SIFR also for MENUS, wouldn't that be great?

Offline

 

#9 2006-01-11 00:32:29

Mark Wubben
sIFR dev
From: Copenhagen
Registered: 2004-08-17
Posts: 6271
Website  Expertise

Re: Space is turning font bigger!

When not using sIFR, you mean not loading the script or not replacing the elements?

And personally I'd rather not see sIFR used for menus, since the links inside Flash are different from normal browser links. Normal activities (at least, for me) such as opening links in a new tab wouldn't be possible. And, of course, there's the philosphy that sIFR is for non-static content.


"The angels stole my phone box" – The Tenth Doctor

Offline

 
  • Index
  •  » sIFR
  •  » Space is turning font bigger!

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson