HighDots Forums  

Overriding amazon.co.uk gaffe

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss Overriding amazon.co.uk gaffe in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Steve Swift
 
Posts: n/a

Default Overriding amazon.co.uk gaffe - 12-01-2007 , 04:13 AM






www.amazon.co.uk is sending me HTML which (rendered down) amounts to:

<head>
<style type="text/css">
INPUT {font-family:fixed}
</style>
</head>
<body>
<form>
<input type="text" value="">
</form>

They presumably wanted "monospace" where they had "fixed". My system
doesn't have a fontface named "fixed" so both Opera and Firefox happily
display <INPUT> controls with no font at all, i.e. white space with a
minuscule cursor that indicates where the text would have been.

Opera has a "User CSS" style sheet (I believe I can even specify a
distinct one for each site). I tried adding:

INPUT {font-family!important:monospace}

… but that didn't make any difference. At this point I don't know enough
to know whether my CSS was foolish, my user.css file wasn't even used,
or some other problem occurred. Was I even close?

I've informed amazon.co.uk (that this problem occurs on almost any page
starting "http://www.amazon.co.uk/") but they're puzzled, and wrote back
asking for a URL, filling me with apprehension. This is only the second
time I've reported this to them, though.

--
Steve Swift
http://www.swiftys.org.uk/swifty.html
http://www.ringers.org.uk

Reply With Quote
  #2  
Old   
Ben C
 
Posts: n/a

Default Re: Overriding amazon.co.uk gaffe - 12-01-2007 , 04:37 AM






On 2007-12-01, Steve Swift <Steve.J.Swift (AT) gmail (DOT) com> wrote:
Quote:
www.amazon.co.uk is sending me HTML which (rendered down) amounts to:

head
style type="text/css"
INPUT {font-family:fixed}
/style
/head
body
form
input type="text" value=""
/form

They presumably wanted "monospace" where they had "fixed". My system
doesn't have a fontface named "fixed" so both Opera and Firefox happily
display <INPUT> controls with no font at all, i.e. white space with a
minuscule cursor that indicates where the text would have been.
That's very odd. If you don't have a font-family called "fixed" then
inputs should just have whatever font they would have had if no font had
been specified. Not no font at all!

Quote:
Opera has a "User CSS" style sheet (I believe I can even specify a
distinct one for each site). I tried adding:

INPUT {font-family!important:monospace}

… but that didn't make any difference.
I think you must be barking up the wrong tree. Although I don't know
what the problem is.

Can you reproduce the problem with a simple test case like the one
above, or do you only see it on actual Amazon pages?


Reply With Quote
  #3  
Old   
Steve Swift
 
Posts: n/a

Default Re: Overriding amazon.co.uk gaffe - 12-01-2007 , 11:25 AM



Ben C wrote:
Quote:
head
style type="text/css"
INPUT {font-family:fixed}
/style
/head
body
form
input type="text" value=""
/form

Can you reproduce the problem with a simple test case like the one
above, or do you only see it on actual Amazon pages?
The test case above is at http://swiftys.org.uk/amazon.html and fails
(in my case) to display text in the input area for both Opera 9.23 and
Firefox 2.0.0.10 (which I would consider to be a bug in both cases).
IE6/7 and Safari(Windows) work correctly.

It is, however, system dependant, and I'm fairly sure it depends on what
fonts you have (or probably don't have) installed.

--
Steve Swift
http://www.swiftys.org.uk/swifty.html
http://www.ringers.org.uk


Reply With Quote
  #4  
Old   
Ben C
 
Posts: n/a

Default Re: Overriding amazon.co.uk gaffe - 12-01-2007 , 11:45 AM



On 2007-12-01, Steve Swift <Steve.J.Swift (AT) gmail (DOT) com> wrote:
Quote:
Ben C wrote:
head
style type="text/css"
INPUT {font-family:fixed}
/style
/head
body
form
input type="text" value=""
/form

Can you reproduce the problem with a simple test case like the one
above, or do you only see it on actual Amazon pages?

The test case above is at http://swiftys.org.uk/amazon.html and fails
(in my case) to display text in the input area for both Opera 9.23 and
Firefox 2.0.0.10 (which I would consider to be a bug in both cases).
IE6/7 and Safari(Windows) work correctly.

It is, however, system dependant, and I'm fairly sure it depends on what
fonts you have (or probably don't have) installed.
It works fine for me in Firefox and Opera. It does find a font somewhere
that it reckons is called "fixed"-- it looks a bit like the font you get
in Notepad.

But if I change your example to "font-family: heffalump", or any other
word most unlikely to correspond to an actual font, I just get the
default font, which is what I would expect.

Perhaps you _do_ have a weird font on your system called "fixed" that's
broken and has tiny invisible glyphs. What do get if you try heffalump?


Reply With Quote
  #5  
Old   
Steve Swift
 
Posts: n/a

Default Re: Overriding amazon.co.uk gaffe - 12-01-2007 , 12:23 PM



Beauregard T. Shagnasty wrote:
Quote:
input { font-family: monospace !important; }
Thanks for that. It certainly fixes the immediate problem, I can now see
what I'm typing at www.amazon.co.uk

For some reason it now uses a font that looks like Times New Roman and
all my attempts to persuade it to use Verdana, Consolas, Bitstream Vera
Sans (or any of my other favourite fonts) fail miserably, but I can live
with this.

My PC is, as far as I'm capable, a "Times New Roman"-free zone.

--
Steve Swift
http://www.swiftys.org.uk/swifty.html
http://www.ringers.org.uk


Reply With Quote
  #6  
Old   
Felix Miata
 
Posts: n/a

Default Re: Overriding amazon.co.uk gaffe - 12-01-2007 , 01:03 PM



On 2007/12/01 13:23 (GMT-0500) Steve Swift apparently typed:

Quote:
Beauregard T. Shagnasty wrote:

input { font-family: monospace !important; }

Thanks for that. It certainly fixes the immediate problem, I can now see
what I'm typing at www.amazon.co.uk

For some reason it now uses a font that looks like Times New Roman and
all my attempts to persuade it to use Verdana, Consolas, Bitstream Vera
Sans (or any of my other favourite fonts) fail miserably, but I can live
with this.

My PC is, as far as I'm capable, a "Times New Roman"-free zone.
If Consolas, the only monospace among those you listed, is what you want,
make it your monospace default in your browser settings. If somehow that
fails, try: input {font-family: consolas !important} in your user stylesheet.
--
" Our Constitution was made only for a moral
and religious people. It is wholly inadequate to
the government of any other." John Adams

Team OS/2 ** Reg. Linux User #211409

Felix Miata *** http://mrmazda.no-ip.com/


Reply With Quote
  #7  
Old   
Steve Swift
 
Posts: n/a

Default Re: Overriding amazon.co.uk gaffe - 12-03-2007 , 12:43 AM



Felix Miata wrote:
Quote:
If Consolas, the only monospace among those you listed, is what you want,
make it your monospace default in your browser settings. If somehow that
fails, try: input {font-family: consolas !important} in your user stylesheet.
I was aware that I'd mixed fixed and variable pitch fonts in my list.

I've never understood why amazon feels the need for my search text input
to be monospaced, so I decided just to set the input style to something
I liked (especially as it's a temporary workaround, but if amazon.co.uk
settles on monospace I may keep my workaround).

My user CSS file certainly fixed the total lack of visible characters,
so it was doing something, and all I required; it just wasn't having the
precise effect that I was specifying.

A few hours later, with no changes to the CSS file, it was working as I
expected. I suspect that restarting Opera was the key.

--
Steve Swift
http://www.swiftys.org.uk/swifty.html
http://www.ringers.org.uk


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.