20 replies [Last post]
hankd
hankd's picture
Offline
Regular
Last seen: 14 years 44 weeks ago
Timezone: GMT-5
Joined: 2005-11-17
Posts: 12
Points: 0

ok i have a site that i have been working on and all of the pages work fine in firefox with my layout style sheet and my presentation style sheet. But i have one page that doesnt work with my presentation style sheet. the page works with the layout style sheet fine. I tried working backwards and i took the styles from the presentation style sheet and put the styles inline on the page and they work but i dont understand why all of the other pages work fine but the last page doesnt.

If you look at it in firefox it uses all the defaults of a browser and I have an Extension plugin for FireFox thats called web developer and im able to change the media types of the style sheets to handheld, print, and screen. when i change the media type to screen the page looks fine but when i refresh the page, the page loses all of the styles but the layout style sheet...

any ideas?

here is the link to the page http://www.fspinternational.org/contactus-form.aspx

thepineapplehead
thepineapplehead's picture
Offline
Guru
Last seen: 26 weeks 3 days ago
Joined: 2004-06-30
Posts: 9668
Points: 801

problem in FireFox w/style sheet will not display

Tony wrote:

The Big Ask:
1. Please choose an appropriate title for your post that best sums up the problem you're seeing, something that is descriptive as this helps members to determine if they could provide help and allows for better search results. Titles that are not suitable include "Help, I have a problem", "Quick, urgent help needed" or "wtf, my code isn't working"

2. Explain the problem as clearly as possible mentioning which browsers you have tested it in and which don't do what you want.

3. Provide a link where possible and try to make the page as clear as you can so it's easier for people looking at the code to see whats going on. If you can, put the CSS into the head of the document and use full paths to any images so we can download the page locally and still see it how we should without having to change paths etc.

Verschwindende wrote:
  • CSS doesn't make pies

drhowarddrfine
Offline
Leader
Last seen: 10 years 42 weeks ago
Timezone: GMT-6
Joined: 2005-05-21
Posts: 764
Points: 0

problem in FireFox w/style sheet will not display

Validate your code.

IE7 is 10 years behind the standards or wrong.
But it works in IE!
IE is a cancer on the web -- Paul Thurott

hankd
hankd's picture
Offline
Regular
Last seen: 14 years 44 weeks ago
Timezone: GMT-5
Joined: 2005-11-17
Posts: 12
Points: 0

problem in FireFox w/style sheet will not display

haha

i was going to say what in the world are you talking about

drhowarddrfine
Offline
Leader
Last seen: 10 years 42 weeks ago
Timezone: GMT-6
Joined: 2005-05-21
Posts: 764
Points: 0

problem in FireFox w/style sheet will not display

You caught it before I edited it again. Validate your code. You have 30 errors.

IE7 is 10 years behind the standards or wrong.
But it works in IE!
IE is a cancer on the web -- Paul Thurott

hankd
hankd's picture
Offline
Regular
Last seen: 14 years 44 weeks ago
Timezone: GMT-5
Joined: 2005-11-17
Posts: 12
Points: 0

problem in FireFox w/style sheet will not display

can you point me in the right direction to fix input field i have crazy error with these i and i dont know how to fix them so that they work right...

thanks

Anonymous
Anonymous's picture
Guru

problem in FireFox w/style sheet will not display

hankd wrote:
can you point me in the right direction to fix input field i have crazy error with these i and i dont know how to fix them so that they work right...
you chose an xhtml 1 transitional doctype so your code will have to comply with xhtml 1.

hankd
hankd's picture
Offline
Regular
Last seen: 14 years 44 weeks ago
Timezone: GMT-5
Joined: 2005-11-17
Posts: 12
Points: 0

problem in FireFox w/style sheet will not display

this is one that you are talking about right?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">

that is one that im using

Anonymous
Anonymous's picture
Guru

problem in FireFox w/style sheet will not display

hankd wrote:
this is one that you are talking about right?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">

that is one that im using
Pardon my french but

Wink Laughing out loud

OK. So, now make your code comply with the xhtml standard. Smile

ClevaTreva
ClevaTreva's picture
Offline
Guru
A hilly place, UK
Last seen: 1 year 46 weeks ago
A hilly place, UK
Joined: 2004-02-05
Posts: 2902
Points: 0

problem in FireFox w/style sheet will not display

hankd wrote:
this is one that you are talking about right?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">

that is one that im using

What they mean is, that is a VALID doctype, so FF won't like it. This is what it looks like:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Trevor

hankd
hankd's picture
Offline
Regular
Last seen: 14 years 44 weeks ago
Timezone: GMT-5
Joined: 2005-11-17
Posts: 12
Points: 0

problem in FireFox w/style sheet will not display

ok so ive fixed all of my code and it passes validation but it still doesnt not fix the problem with the style sheet... any other comments?

ClevaTreva
ClevaTreva's picture
Offline
Guru
A hilly place, UK
Last seen: 1 year 46 weeks ago
A hilly place, UK
Joined: 2004-02-05
Posts: 2902
Points: 0

problem in FireFox w/style sheet will not display

Hi

This is now the top of your page:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
  <title>FSPi</title>
  
  <link type="text/css" rel="stylesheet" title="2 column layout" href="2columnLeft.css" media="screen" />
  <link type="text/css" rel="stylesheet" title="presentation" href="/presentation.css" media="screen" />

Try taking out the / before the href for presentation.css

Trevor

drhowarddrfine
Offline
Leader
Last seen: 10 years 42 weeks ago
Timezone: GMT-6
Joined: 2005-05-21
Posts: 764
Points: 0

problem in FireFox w/style sheet will not display

auto is not a valid value for line-height.

IE7 is 10 years behind the standards or wrong.
But it works in IE!
IE is a cancer on the web -- Paul Thurott

hankd
hankd's picture
Offline
Regular
Last seen: 14 years 44 weeks ago
Timezone: GMT-5
Joined: 2005-11-17
Posts: 12
Points: 0

problem in FireFox w/style sheet will not display

thanks again guys you have been great...

ive did what you guys have said and nothing... have you guys seen anything else?

thanks again

ClevaTreva
ClevaTreva's picture
Offline
Guru
A hilly place, UK
Last seen: 1 year 46 weeks ago
A hilly place, UK
Joined: 2004-02-05
Posts: 2902
Points: 0

problem in FireFox w/style sheet will not display

Hi Hank

CONGRATULATIONS

You appear to have found a Firefox bug. Can't find it in Bugzilla either.

The bug is this:

The <link> element can have a title, according to w3c specs.

However, if you have more than one link, with FF only one can have a title. If you have more than one with a title, FF reads only one link!

Anybody got a Bugzilla account? Can't remember my account details (so long since I found a bug)!

Trevor

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 3 hours 20 min ago
Dallas
Timezone: GMT-5
Joined: 2004-06-25
Posts: 9767
Points: 3849

problem in FireFox w/style sheet will not display

Interesting. I did a test case, and found that what's happening is the various links with a title are treated as alternative stylesheets. Open view⇒style and you'll see the titles listed as alternatives. Opera does the same.

I would think the rel="alternate" attribute would be used for that, with the title merely supplying a, er, title for the link.

I do think Moz and Opera are doing things wrongly, and I filed bug #317395. If you register, you can place a vote for this bug and add additional info if you like.

This is my test case:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xml:lang="en"
      xmlns="http://www.w3.org/1999/xhtml"
      lang="en">
<head>
  <title>Multiple Links with Title Attr</title>
  <meta http-equiv="content-type"
        content="text/html; charset=utf-8" />
  <meta name="generator"
        content="
        HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
        
  <meta name="editor"
        content="Emacs 21" />
  <meta name="author"
        content="Gary Turner" />

  <link type="text/css"
        rel="stylesheet"
        href="stylesheet1.css"
        title="css1" />
  <link type="text/css"
        rel="stylesheet"
        href="stylesheet2.css" />
  <link type="text/css"
        rel="stylesheet"
        href="stylesheet3.css"
        title="css3" />
</head>

<body>
  <p id="p1">This paragraph is controlled by stylesheet1.css. The text
  should be red.</p>
  <p id="p2">This paragraph is controlled by stylesheet2.css. The text
  should be green.</p>
  <p id="p3">This paragraph is controlled by stylesheet2.css. The text
  should be blue.</p>

</body>
</html>
==========
/* stylesheet1.css */

#p1 {
    color: red;
    }

/* stylesheet2.css */

#p2 {
    color: green;
    }

/* stylesheet3.css */

#p3 {
    color: blue;
    }

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

hankd
hankd's picture
Offline
Regular
Last seen: 14 years 44 weeks ago
Timezone: GMT-5
Joined: 2005-11-17
Posts: 12
Points: 0

problem in FireFox w/style sheet will not display

thats really weird... ClevaTreva... i did get rid of the titles and it works now... thanks for the help... but that really is a bug like you said... but i do say good call..

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 3 hours 20 min ago
Dallas
Timezone: GMT-5
Joined: 2004-06-25
Posts: 9767
Points: 3849

problem in FireFox w/style sheet will not display

Well, it appears I was wrong; it is not a bug. From http://www.w3.org/TR/html401/present/styles.html#specifying-external

# Specify that the style sheet is persistent, preferred, or alternate:

    * To make a style sheet persistent, set the rel attribute to "stylesheet" and don't set the title attribute.
    * To make a style sheet preferred, set the rel attribute to "stylesheet" and name the style sheet with the title attribute.
    * To specify an alternate style sheet, set the rel attribute to "alternate stylesheet" and name the style sheet with the title attribute.
My bug is a duplicate (I swear I searched!) of Bug #231920 and is invalid.

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

ClevaTreva
ClevaTreva's picture
Offline
Guru
A hilly place, UK
Last seen: 1 year 46 weeks ago
A hilly place, UK
Joined: 2004-02-05
Posts: 2902
Points: 0

problem in FireFox w/style sheet will not display

Hey ho, so there you go. I never did use titles anyway. More typing my fingers didn't want to do.

Tyssen
Tyssen's picture
Offline
Moderator
Brisbane
Last seen: 5 years 49 weeks ago
Brisbane
Timezone: GMT+10
Joined: 2004-05-01
Posts: 8201
Points: 1386

problem in FireFox w/style sheet will not display

I was going to say, giving stylesheets titles is the key to stylesheet switching as outlined by A List Apart in their article on the subject.

How to get help
Post a link. If you can't post a link, jsFiddle it.
My blog | My older articles | CSS Reference

ClevaTreva
ClevaTreva's picture
Offline
Guru
A hilly place, UK
Last seen: 1 year 46 weeks ago
A hilly place, UK
Joined: 2004-02-05
Posts: 2902
Points: 0

problem in FireFox w/style sheet will not display

Tyssen wrote:
I was going to say, giving stylesheets titles is the key to stylesheet switching as outlined by A List Apart in their article on the subject.

That would make sense if it also triggers the alternate behaviour.