• Our new ticketing site is now live! Using either this or the original site (both powered by TrainSplit) helps support the running of the forum with every ticket purchase! Find out more and ask any questions/give us feedback in this thread!

Web coding assistance please!

Status
Not open for further replies.

pdeaves

Established Member
Joined
14 Sep 2014
Messages
5,932
Location
Gateway to the South West
On my web site index page http://www.railwaycodes.org.uk/ is a collapsible list showing the corporate users, for which I have recently changed the coding. Previously when a user clicked the list the page jumped up to the top of the page at the same time. I have now solved that issue but inadvertently created another!

The font in the 'click line' is, I think, Arial, which is fine if your browser is set to that font by default. I cannot find a way to make this the same as everything else on the page (the user-specified default font). The hidden text picks up the page font fine.

Is there anyone who understands coding better than me who can suggest a way to 'unoverride' the font, please? Thanks!
 
Sponsor Post - registered members do not see these adverts; click here to register, or click here to log in
R

RailUK Forums

GCRS

Member
Joined
28 Nov 2016
Messages
43
Adding font-family: initial; to your button.accordion css seems to fix it, at least in Chrome.
 

pdeaves

Established Member
Joined
14 Sep 2014
Messages
5,932
Location
Gateway to the South West
Thanks for the fast replies.

I have tried the suggestion but it doesn't seem to make a difference. Have I done it right? Any other thoughts?
 

pdeaves

Established Member
Joined
14 Sep 2014
Messages
5,932
Location
Gateway to the South West
Thanks. I have tried the site from another computer and operating system and the font is consistent throughout (i.e. like I want it to be). It looks like my computer does not interpret the instruction as it should!
 

northwichcat

Veteran Member
Joined
23 Jan 2009
Messages
32,692
Location
Northwich
That usually means the code isn't quite correct but it's close enough for some browsers to display it correctly.
 

najaB

Veteran Member
Joined
28 Aug 2011
Messages
33,623
Location
Scotland
That usually means the code isn't quite correct but it's close enough for some browsers to display it correctly.
Equally, it could be that pdeaves is viewing a cached copy of the site. Certainly, I cannot see anything in the markup which would cause the font to display differently on that DIV only.
 

najaB

Veteran Member
Joined
28 Aug 2011
Messages
33,623
Location
Scotland
Thanks. I have tried the site from another computer and operating system and the font is consistent throughout (i.e. like I want it to be).
Out of curiosity, is there any reason you're using 1998's fonts? There are literally hundreds of fonts available for free with a couple of lines of CSS and if for some reason they aren't available the site will fall back to the default serif font.
 

northwichcat

Veteran Member
Joined
23 Jan 2009
Messages
32,692
Location
Northwich
Equally, it could be that pdeaves is viewing a cached copy of the site. Certainly, I cannot see anything in the markup which would cause the font to display differently on that DIV only.

I was presuming the advice above about clearing cache had already been followed.

At a quick glance the only thing I can spot is the use of the deprecated <font> tag but that's only been used to change the colour of the text.

Out of curiosity, is there any reason you're using 1998's fonts?

I'm a bit confused about why they seem to have specified the font should be the browser default font.
 
Status
Not open for further replies.

Top