CSS randomly not working

callumacrae

not alex mac
Community Support
Messages
5,257
Reaction score
97
Points
48
I'm using FF and looking at the first page of my site ( http://paperforum.x10hosting.com/ ) but the link on the top right (login) stays that colour and size whatever I put in the style or class tags.

Looking at the source, it should be white and small, but it is red and big instead,

Does anyone know why?

Thanks if you can help.
 

TechAsh

Retired
Messages
5,853
Reaction score
7
Points
38
The Login link looks small and white to me. Make sure you clear your cache (Ctrl + F5) every time you make a change.
 

Trigintillion

New Member
Messages
19
Reaction score
0
Points
0
Well, if it's insufficiently small and white, I suggest removing your <span> around the link, just for clarity. You don't need it if you've got the necessary styling information in the <a class="genmedw">.

Also, I'm not too familiar with the "em" measurement; I believe that since it only corresponds to what has been stored on the particular computer that's viewing it, you should use px values (say, a.genmedw {font-size:12px;}). That's all I can suggest.
 

Nathan H

New Member
Messages
562
Reaction score
0
Points
0
I belive your problem might be in the fact is is a link, try changing your a:visited definition

edit: nm its not that

it's odd you use different stylesheets for your homepage and everything else
 
Last edited:

callumacrae

not alex mac
Community Support
Messages
5,257
Reaction score
97
Points
48
I have now logged out, it is fine...

Logged in again...
Red again.

Okay, if anyone want to look, the test account is:

Freddy
password

I'm now confused. It looks different to the forum, yet it uses the same stylesheet?

UnFoundBug: I know it's odd, but I take bit's of it down at a time to develop it, and I need the stylesheets as well. Actually, I'll change it now.
 

TechAsh

Retired
Messages
5,853
Reaction score
7
Points
38
Looking at the source code I see:
Code:
<td height="32" align="right">&nbsp;&nbsp;<span class="genmedw"><a href="forum/ucp.php?mode=logout&amp;sid=f537e37ba92101b548500a02bd5b39c2" class=\"genmedw\">Logout [ Freddy ]</a></span></td>
Are those backslashes meant to be there. I don't know if there are causing a problem or not but...

The font size problem may be caused but the "1em" in the CSS. em usually means something like bold, try using "px" instead. Try 10px that should work.


I've tested my ideas using a Firefox plugin and have found that if you remove those backslashes and change the CSS as I've suggested everything should work.
 
Last edited:

tnl2k7

Banned
Messages
3,131
Reaction score
0
Points
0
TechAsh, well found. It looks as if they've been done like that to escape them in PHP, but maybe he used a different type of quote, leading to it being displayed to the browser. These may well be the source of the issue.

-Luke.
 

woiwky

New Member
Messages
390
Reaction score
0
Points
0
The font size problem may be caused but the "1em" in the CSS. em usually means something like bold, try using "px" instead. Try 10px that should work
An em is a browser/OS-dependant unit of measurement which is based on the default font size. For example, Firefox has a default font size of 16px(I think), so 1em = 16px, 1.5em = 24px, etc. But regardless, you're right about using px since an em can vary from user to user.
 

callumacrae

not alex mac
Community Support
Messages
5,257
Reaction score
97
Points
48
What text size would I want to set it too?

TechAsh: Well found, I would give you rep, but you help me too much and so it won't let me.

Code:
echo '<a href="http://forums.x10hosting.com/programming-help/' . append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=logout', true, $user->session_id). '" class=\"genmedw\">Logout [ ' . $user->data['username'] . ' ]</a>';

Now I see :)
Colour now works, but size doesn't.
 
Top