Help - Search - Members - Calendar
Full Version: CSS/HTML code not working in FireFox...
HTMLHelp Forums > Web Authoring > Cascading Style Sheets
echris1015
Here is a sample with what I'm working with...

http://www.angelfire.com/oh5/rwb/DVD/ECW.html

The top table row is meant to show up with a blue background, the second with a gray background, and the third with a blue background. If you look at the page in IE, it shows up fine. Firefox, not so much. It worked in Firefox for a few days, then went all white where I had the colors previously. If I need to copy/paste/clip anything, please let me know if that would be easier.

Also, I barely know CSS code as it is, and I used the majority of this code from another site (with permission), tweaking it to my needs.
Darin McGrew
I recommend that you start by fixing the markup errors reported by our online validator. There are a lot of structural problems.
echris1015
QUOTE(Darin McGrew @ Jul 3 2008, 01:59 AM) *

I recommend that you start by fixing the markup errors reported by our online validator. There are a lot of structural problems.


I have no idea where to even begin. Like I said in the original post, I borrowed the code and made minor tweaks. I'm not asking for someone to critique the entire thing and tell me how horrible the code is, just asking for someone to fix the minor problem I'm having. I mean, if someone wants to fix it, fine by me, but there's no way I'd even know what to do to fix the errors.
Darin McGrew
Please see the FAQ entries Where can I learn about HTML? and Where can I learn about CSS?
echris1015
QUOTE(Darin McGrew @ Jul 3 2008, 11:44 AM) *


Can anyone actually fix the small problem I'm having?

I'm not going to learn entire HTML/CSS when I just need one minor problem fixed. If you can't help, that's fine, but please stop telling me to do this and that when what I'm looking for is clearly worded in the first post. Thanks.
Brian Chandler
QUOTE(echris1015 @ Jul 4 2008, 12:48 AM) *

QUOTE(Darin McGrew @ Jul 3 2008, 11:44 AM) *


Can anyone actually fix the small problem I'm having?

I'm not going to learn entire HTML/CSS when I just need one minor problem fixed. If you can't help, that's fine, but please stop telling me to do this and that when what I'm looking for is clearly worded in the first post. Thanks.


Are you prepared to pay? How much?
echris1015
QUOTE(Brian Chandler @ Jul 3 2008, 12:11 PM) *

QUOTE(echris1015 @ Jul 4 2008, 12:48 AM) *

QUOTE(Darin McGrew @ Jul 3 2008, 11:44 AM) *


Can anyone actually fix the small problem I'm having?

I'm not going to learn entire HTML/CSS when I just need one minor problem fixed. If you can't help, that's fine, but please stop telling me to do this and that when what I'm looking for is clearly worded in the first post. Thanks.


Are you prepared to pay? How much?


If you can fix it and clean up the code at the same time, offer an estimate for your services.
Darin McGrew
Since echris1015 wants someone else to do the job, rather than learning how to do it, I have moved this thread to "Jobs Seeking Programmers".
echris1015
QUOTE(Darin McGrew @ Jul 3 2008, 12:33 PM) *

Since echris1015 wants someone else to do the job, rather than learning how to do it, I have moved this thread to "Jobs Seeking Programmers".


Yep, because its a smart move telling me to spend days learning complete CSS when I need about five minutes of help from a member here. wacko.gif

Last time I checked, it was called HTMLHELP forums - guess they need to change the title. The only help I've gotten was someone saying "Your code has a ton of errors" and a link to learning CSS. Instead of helping, I get the "Go learn yourself" response. If that isn't help, I don't know what is.

Also, why was this moved when someone OFFERED to fix the code for a fee, when I didn't request that in the first place at all. If anything, this board does the OPPOSITE of helping.
Darin McGrew
You are not the first person to think that the purpose of the forums is to "provide a code" that does something, or to fix someone's broken web page for them.

However, most of the regulars are more interested in "teaching you to fish" rather than "giving you a fish". If you want to learn about HTML, CSS, etc., or if you want help using the tools, then just ask. But don't be surprised if no one else is interested in helping when you've demonstrated little effort yourself.
Frederiek
I'm sorry you feel like this, echris1015.
Fixing the HTML errors reported by the online validation tools WILL fix you problems, as far as I can see. If you know the basic structure of an HTML page, you don't have to "learn" as much as that. (see http://htmlhelp.com/reference/html40/structure.html#doc, adding that <style> and/or <script> tags go in the HEAD)

Darin's absolutely right, I too rather teach you how to fish than give you the fish.
echris1015
QUOTE(Darin McGrew @ Jul 3 2008, 02:14 PM) *

You are not the first person to think that the purpose of the forums is to "provide a code" that does something, or to fix someone's broken web page for them.

However, most of the regulars are more interested in "teaching you to fish" rather than "giving you a fish". If you want to learn about HTML, CSS, etc., or if you want help using the tools, then just ask. But don't be surprised if no one else is interested in helping when you've demonstrated little effort yourself.


I'm not asking for someone to provide, I'm asking for someone to HELP. I'm not asking for anyone to provide or create anything, I'm asking for someone to look over the code and tell me where I made an error with the ONE problem I was having, explained in the first post. I'm not asking for someone to make code from scratch because I'm too lazy or anything like that. I'm not interesting in learning how to fish, I'm already fishing, but ran into a problem, and need a few minutes of advice. But, that is too much for you, or anyone else to do, apparently, because you're too nice (sarcasm) of a person to take two minutes from your day and offer HELP - that would be fine, but instead of simply not offering help, you've basically told me to screw asking for help and learn yourself. I mean, its pretty easy to sit back, point out my errors, then tell me to go fix those problems without offering a bit of advice other than "learn the code," now isn't it? Must be nice sitting on that high throne.

Thanks. Here's hoping next time you need help on something, someone points out your mistakes, but doesn't offer any help.

If you asked someone to help in a car repair you did not know how to do, would they request you learn all about the inner workings of the vehicle before they help you?

If you wanted to learn how to throw a spiral football instead of a wobbly pass, would they insist you know the entire mechanics of football?

No, you wouldn't. You'd try yourself, and when you made a mistake, you'd ask for help it doing it correctly, which is no different then what I'm doing here.

echris1015
QUOTE(Frederiek @ Jul 3 2008, 02:36 PM) *

I'm sorry you feel like this, echris1015.
Fixing the HTML errors reported by the online validation tools WILL fix you problems, as far as I can see. If you know the basic structure of an HTML page, you don't have to "learn" as much as that. (see http://htmlhelp.com/reference/html40/structure.html#doc, adding that <style> and/or <script> tags go in the HEAD)

Darin's absolutely right, I too rather teach you how to fish than give you the fish.


I went through the validation tool, printed out what needed to be fixed, and then was entirely confused by the error reports given on most of the lines.

I mean, for example, it simply says "element not allowed here" - okay, that's fine, but I have no idea where to put it so it would be correct. Etc. For example, I move the all of the style and script tags in the HEAD section, and it completely screws with the format of the page.
Darin McGrew
Here's an explanation of your current markup errors:

CODE
Error: missing document type declaration; assuming HTML 4.01 Transitional
It's missing. See the FAQ entry What is a DOCTYPE? Which one do I use?

CODE
Warning: net-enabling start-tag; possibly missing required quotes around an attribute value
You're using XHTML syntax in an HTML document. If you aren't using XHTML, then don't use the <tag/> format. Just use the <tag> format.

CODE
Error: element ... not allowed here; check which elements this element may be contained within
The META, LINK, and STYLE elements belong in the HEAD, not in the BODY.

CODE
Error: required attribute TYPE not specified
Use <style type="text/css"> rather than just <style>.

CODE
Error: element BODY not allowed here; check which elements this element may be contained within
You can have only one <body> tag, not two.

CODE
Error: end tag for element STYLE which is not open; try removing the end tag or check for improper nesting of elements
You've got an extra </style> tag.

CODE
Error: end tag for element HEAD which is not open; try removing the end tag or check for improper nesting of elements
The HEAD element is closed automatically when the BODY starts. You've got a </head> tag after the second <body> tag.

CODE
Warning: net-enabling start-tag; possibly missing required quotes around an attribute value
Error: end tag for B omitted; possible causes include a missing end tag, improper nesting of elements, or use of an element where it is not allowed
Error: end tag for B omitted; possible causes include a missing end tag, improper nesting of elements, or use of an element where it is not allowed
It looks like you're using <b/> as a synonym for <b></b>, which works (but is meaningless) in XHTML, but which is broken in HTML. Just delete it.

CODE
Error: end tag for ... omitted; possible causes include a missing end tag, improper nesting of elements, or use of an element where it is not allowed
You are missing </table> and </div> tags.
echris1015
Thanks for helping. I fixed the errors so that no errors appear on the validator when I run it through. I was unsure if I used the right DOC TYPE so I used the one the validator assumed I was using.

But, the color error I'm having explained in the first thread still isn't corrected and I can't figure it out.
echris1015
And now the problem is both in IE and FireFox. Ugh.
pandy
What is supposed to make those colors happen? I didn't look at your CSS, but (the TDs in) the three first rows have the same classes attached to them, so I don't see how they could have different background colors.


HTML
<tr><td class=hd><p style='height:16px;'>.</td>
<td class='g s5'>Battle of the Belts (1/23/93)
<td class='g s6'>1
<td class='g s6'>Handheld
<td class='g s6'>VG
<td class='g s6'>

<tr><td class=hd><p style='height:16px;'>.</td><td class='g s5'>Summer Sizzler (6/19/93)
<td class='g s6'>1
<td class='g s6'>ECW Home Video
<td class='g s6'>VG
<td class='g s6'>

<tr><td class=hd><p style='height:16px;'>.</td><td class='g s5'>Ultra Clash (9/18/93)
<td class='g s6'>1
<td class='g s6'>ECW Home Video
<td class='g s6'>VG/EX
<td class='g s6'>
echris1015
QUOTE(pandy @ Jul 3 2008, 04:53 PM) *

What is supposed to make those colors happen? I didn't look at your CSS, but (the TDs in) the three first rows have the same classes attached to them, so I don't see how they could have different background colors.


HTML
<tr><td class=hd><p style='height:16px;'>.</td>
<td class='g s5'>Battle of the Belts (1/23/93)
<td class='g s6'>1
<td class='g s6'>Handheld
<td class='g s6'>VG
<td class='g s6'>

<tr><td class=hd><p style='height:16px;'>.</td><td class='g s5'>Summer Sizzler (6/19/93)
<td class='g s6'>1
<td class='g s6'>ECW Home Video
<td class='g s6'>VG
<td class='g s6'>

<tr><td class=hd><p style='height:16px;'>.</td><td class='g s5'>Ultra Clash (9/18/93)
<td class='g s6'>1
<td class='g s6'>ECW Home Video
<td class='g s6'>VG/EX
<td class='g s6'>



The code right before you started the copy/paste has a td that spans the five rows and it class g s4, which includes a blue background and white lettering. There are also some others before that have background colors as well. Those TDs you posted are actually like the fourth ones down on the page and in the code - there are no colors in those that you posted - there aren't supposed to be.
pandy
I'm confused now. So which rows are supposed to have diferent colors? You first said the first, second and third.
echris1015
QUOTE(pandy @ Jul 3 2008, 05:03 PM) *

I'm confused now. So which rows are supposed to have diferent colors? You first said the first, second and third.


Yeah, that hasn't changed. The first, second, and third are supposed to have colors. You started copy/pasting with fourth row on the page, which is white.
Darin McGrew
Part of the confusion is that you're pulling in //spreadsheets.google.com/client/css/159550030-trix_main.css as well as providing your own inline style sheet.

This row is funny.
CODE
<tr><td class=hd><p style='height:33px;'>.</td>

<td colspan=5 class='g s0'>Extreme Championship Wrestling</td>


<td class='g' style='display:none;'><td class='g' style='display:none;'><td class='g' style='display:none;'><td class='g' style='display:none;'>
The Google style sheet hides the content in td.hd p.

Your style sheet sets the background color of .g to white and sets the (foreground) color of .s0 to white, but it should also set the background color of .s0 to #333399.

Ah... but you also specify a white background with a style attribute for an enclosing div element. And that has specificity equal to the specificity of an id selector, so it overrides the other rules.

PS: I moved the thread back.
pandy
QUOTE(echris1015 @ Jul 3 2008, 11:15 PM) *

Yeah, that hasn't changed. The first, second, and third are supposed to have colors. You started copy/pasting with fourth row on the page, which is white.


I went for the visible rows. Sorry, I realize that was kinda stupid.


QUOTE(Darin McGrew @ Jul 3 2008, 11:49 PM) *

PS: I moved the thread back.


Where did it go? wacko.gif
echris1015
QUOTE(Darin McGrew @ Jul 3 2008, 05:49 PM) *

Part of the confusion is that you're pulling in //spreadsheets.google.com/client/css/159550030-trix_main.css as well as providing your own inline style sheet.

This row is funny.
CODE
<tr><td class=hd><p style='height:33px;'>.</td>

<td colspan=5 class='g s0'>Extreme Championship Wrestling</td>


<td class='g' style='display:none;'><td class='g' style='display:none;'><td class='g' style='display:none;'><td class='g' style='display:none;'>
The Google style sheet hides the content in td.hd p.

Your style sheet sets the background color of .g to white and sets the (foreground) color of .s0 to white, but it should also set the background color of .s0 to #333399.

Ah... but you also specify a white background with a style attribute for an enclosing div element. And that has specificity equal to the specificity of an id selector, so it overrides the other rules.

PS: I moved the thread back.


I'm officially confused.

I've tried replacing/deleting the Google .css I was using, but it throws the table way off. Well, not way off, but it changes the text, borders, and final columns all off. I'm guessing I'm using part code from this sheet and part code from my own sheet and it doesn't interact too well. Hmm.

I tried finding the white background specified for the enclosing dv element, but I couldn't find that line of code. It sounds like if I can find that line of code and change it or delete it, it would stop overriding the other code I've written.

I set the background colors of both the .g and the .s0 to 333399, no change.
Darin McGrew
QUOTE(pandy @ Jul 3 2008, 03:36 PM) *
I went for the visible rows. Sorry, I realize that was kinda stupid.
I looked at the source. When I saw the row that wasn't appearing in the browser, I used Ctrl-A to select (and highlight) everything.

QUOTE(Darin McGrew @ Jul 3 2008, 11:49 PM) *
PS: I moved the thread back.
QUOTE(pandy @ Jul 3 2008, 03:36 PM) *
Where did it go? wacko.gif
I had moved it to the "Jobs Seeking Programmers" because it looked like the OP just wanted someone to do the work.
Darin McGrew
QUOTE(echris1015 @ Jul 3 2008, 03:40 PM) *
I've tried replacing/deleting the Google .css I was using, but it throws the table way off. Well, not way off, but it changes the text, borders, and final columns all off. I'm guessing I'm using part code from this sheet and part code from my own sheet and it doesn't interact too well. Hmm.
There's a lot of magic in that style sheet. The content of the first column of every row is hidden, for example.

QUOTE(echris1015 @ Jul 3 2008, 03:40 PM) *
I tried finding the white background specified for the enclosing dv element, but I couldn't find that line of code.
It looks like this:
CODE
<div id="content" style="background-color: #FFFFFF;">
echris1015


I was hoping that wasn't the div element you were talking about. I had already changed the color to 333399 and got no change, so I was hoping there was another that I missed.

I'm guessing the .css sheet I'm linked to contains the code that is overriding, because all of the applicable colors that are coded to show up in those first three rows are now set to 3333999 (or the shade of gray for the second row).
echris1015
QUOTE(echris1015 @ Jul 3 2008, 07:07 PM) *

I was hoping that wasn't the div element you were talking about. I had already changed the color to 333399 and got no change, so I was hoping there was another that I missed.

I'm guessing the .css sheet I'm linked to contains the code that is overriding, because all of the applicable colors that are coded to show up in those first three rows are now set to 3333999 (or the shade of gray for the second row).


Yep, its something in the code I had linked, going to be a long day trying to find it.

I got rid of the link and copied the contents of the .css file into Word - then replaced all the FFF colors with another color and all of the backgrounds where that new color I had put into the Google Docs code.

So, one of those lines of codes with an fff color was overriding the code I had on there. Going to be a long day, though, to find out what I can and can't use from that Google Docs code.
echris1015

Fixed. Thanks!
Brian Chandler
Quick question: Are CSS class names _really_ allowed to include spaces?

(Cancel that: I guess that this is how to specify two classes in one go. How ugly.)
Frederiek
The only HTML error you still have is a closing </div> tag at the end of the code which has no opening <div> tag. Just get rid of it if the DIV has no real purpose.
echris1015
QUOTE(Frederiek @ Jul 4 2008, 04:14 AM) *

The only HTML error you still have is a closing </div> tag at the end of the code which has no opening <div> tag. Just get rid of it if the DIV has no real purpose.


Yep, I know. Thanks.
pandy
QUOTE(Brian Chandler @ Jul 4 2008, 09:40 AM) *

Quick question: Are CSS class names _really_ allowed to include spaces?

No.
http://www.w3.org/TR/html401/struct/global.html#adef-class
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.