View previous topic :: View next topic |
Author |
Message |
zodiac
Joined: 14 Apr 2002 Posts: 11
|
Posted: Wed Aug 21, 2002 2:28 am Post subject: something overriding my CSS ? |
|
|
Hello :)
I am attempting to format the b2.php file by linking to an external stylesheet, but something is overriding my CSS definitions. Any idea what it might be and how to get around it?
on a side note, what exactly is "rss syndication?"
thanks much, and keep up the great work!
-Paula |
|
Back to top |
|
 |
.Chris
Joined: 30 Apr 2002 Posts: 186 Location: Hawaii
|
Posted: Wed Aug 21, 2002 2:38 am Post subject: |
|
|
We'd need to see an example.. |
|
Back to top |
|
 |
zodiac
Joined: 14 Apr 2002 Posts: 11
|
|
Back to top |
|
 |
.Chris
Joined: 30 Apr 2002 Posts: 186 Location: Hawaii
|
Posted: Wed Aug 21, 2002 3:07 am Post subject: |
|
|
I'm not an expert at all, okay. But where you have Code: | p, div {font-family:verdana, sans-serif; font-size:10px; line-height:17px; color:#CCCC99;} | Shouldn't it be Code: | p {font-family:verdana, sans-serif; font-size:10px; line-height:17px; color:#CCCC99;} | If it was supposed to be a tan or yellow like color, I was seeing it fine. |
|
Back to top |
|
 |
DarkWulf

Joined: 13 Aug 2002 Posts: 18
|
Posted: Wed Aug 21, 2002 7:01 am Post subject: |
|
|
seems to me the p, div applies it to both p AND div. |
|
Back to top |
|
 |
michel v Site Admin
Joined: 25 Jan 2002 Posts: 799 Location: Corsica
|
Posted: Wed Aug 21, 2002 9:47 am Post subject: |
|
|
I'm seeing the yellowish color too, on Mozilla. |
|
Back to top |
|
 |
.Chris
Joined: 30 Apr 2002 Posts: 186 Location: Hawaii
|
Posted: Wed Aug 21, 2002 4:21 pm Post subject: |
|
|
I understand that DarkWulf. However, I never seen anyone do their css in that manner to define 2 elements. |
|
Back to top |
|
 |
Guest
|
Posted: Wed Aug 21, 2002 5:15 pm Post subject: |
|
|
hey all thanks for your help. i figured out the problem... it wasn't the code, it was the stupid old browsers i have to use until i'm able to upgrade later this year. i fixed it by quitting them all and reloading. seems i have to do this periodically... ah well.
the trick with defining two elements at once is something i picked up from zeldman.com. I was suspicious of it too at first but apparently its valid, plus all the browsers seem to support it. if anybody finds one (aside from very old ones) that doesn't work I'd be interested in knowing about it.
thanks again! :)
-Paula |
|
Back to top |
|
 |
DarkWulf

Joined: 13 Aug 2002 Posts: 18
|
Posted: Thu Aug 22, 2002 5:58 pm Post subject: |
|
|
you learn all sorts of weird things looking at other people's code.
i never realized that using the # sign can be used to point at specific ID's instead of classes. incidentally, you can also use stuff like "#nav td.class" and it only affects td tags with the class class within the element whose' id is nav.
i wonder where this stuff is listed. |
|
Back to top |
|
 |
dtdgoomba
Joined: 05 Aug 2002 Posts: 179 Location: Cambridge, MA
|
Posted: Thu Aug 22, 2002 7:26 pm Post subject: |
|
|
Whenever I ask my comp sci roommate those questions, he sends me to w3c.org
i just went looking now and got this
http://www.w3.org/TR/REC-CSS1#id-as-selector
This was the main page for their CSS stuff
http://www.w3.org/Style/CSS/
I was checking how they set up that banner in the top right for navigation as well...
hope that helps |
|
Back to top |
|
 |
.Chris
Joined: 30 Apr 2002 Posts: 186 Location: Hawaii
|
Posted: Thu Aug 22, 2002 7:46 pm Post subject: |
|
|
Yup, that's where I go. |
|
Back to top |
|
 |
lousypoet
Joined: 09 Aug 2002 Posts: 72 Location: Atlanta, GA
|
Posted: Thu Aug 29, 2002 2:13 am Post subject: more css fun |
|
|
Yep, I go there, too, when I can't figure something out.
I know a lot of those sorts of tricks. I used to try to cut every byte I could from my stylesheet while still having the same effects and having it still be valid. Quite tricky.
Just some I think are most interesting ...
if you want every submit/reset/button input type to have a different cursor style, say a pointer, instead of writing class="pointer" in every html tag, do this (works in mozilla/nn6, maybe someday in IE)
input[type=submit]{cursor:pointer;}
or
*[type=submit]{cursor:pointer;}
or
[type=submit]{cursor:pointer;}
A neat thing I found in an ALA article which I've used extensively is a certain definition in a print stylesheet (those are fun by themselves). It displays the href attribute of a link in parenthesis after the link text when you PRINT the page, because links are pretty useless in print otherwise.
Code: | @media print{
a:after{content:" ("attr(href)")";}
} |
And don't ever forget that it's CASCADING style sheets--a style rule on a tag overrides the style rule inside <style> tags which overrides the style rule in a separate stylesheet.
and if you want to use the same font family throughout your site, a good way to start off your stylesheet is to set it for all the elements you may use (this covers most of the tags):
Code: | html,div,h1,h2,h3,h4,h5,h6,input,select,textarea{
font-family: verdana, arial, helvetica, sans-serif;
} |
then you can just set the sizes and weights of the other elements, and never worry about the family. |
|
Back to top |
|
 |
afterefx
Joined: 13 Jun 2003 Posts: 25 Location: Texas
|
Posted: Tue Jun 24, 2003 11:27 pm Post subject: |
|
|
if u need help on css just go here. msdn css _________________
|
|
Back to top |
|
 |
|