Two CSS Question

  • pbrasilbr_brasil
  • Novice
  • Novice
  • pbrasilbr_brasil
  • Posts: 18
  • Loc: Brazil

Post 3+ Months Ago

I would like to can i design text-colors on a text-style.
Like...i always have to make a new style for write the same text with a different color... :!:
an example: i have:
Code: [ Select ]
{font-family:Geneva, Arial, Helvetica, sans-serif;
 font-weight: bold;
{font-family:Geneva, Arial, Helvetica, sans-serif;
 font-weight: bold;
  1. .write-medium-bold-red
  2. {font-family:Geneva, Arial, Helvetica, sans-serif;
  3.  font-size:medium;
  4.  font-weight: bold;
  5.  color:#FF0000;}
  6.  .write-medium-bold-white
  7. {font-family:Geneva, Arial, Helvetica, sans-serif;
  8.  font-size:medium;
  9.  font-weight: bold;
  10.  color:#FFFFFF;
  11.  }

See...the two tags are pratically the same thing, the only thing who's different is the color...i would like to know if there's any way for me to design the design if the text is italic or not...things like that. :shock:

The second question is...
Why'd my CSS do not load the scrollbar...
only when i put the <style> before everything on the site, it loads the scrollbar...if i try to use it only on my external CSS , it do not works...
Is that because i use .asp extension onto all my files ? i do not use .htm ...

that's it. Thank you all for attention and help.
Pablo. :D
  • joebert
  • Genius
  • Genius
  • User avatar
  • Posts: 13511
  • Loc: Florida

Post 3+ Months Ago

Place all styles before the first set of attributes seporated by commas ,
and define changes in following like so.
Code: [ Select ]
.style1,.style2{font-family:Geneva, Arial, Helvetica, sans-serif;
font-weight: bold;

  1. .style1,.style2{font-family:Geneva, Arial, Helvetica, sans-serif;
  2. font-size:medium;
  3. font-weight: bold;
  4. color:#FF0000;}
  5. .style2{color:#FFFFFF}

As for your second question, I have the same problem & would really like to see an answer as well. I can get textareas to take on the colors yet the main scrollbars do not change.
  • gsv2com
  • Professor
  • Professor
  • User avatar
  • Posts: 776
  • Loc: Nippon

Post 3+ Months Ago

And it's better to name your classes after their job, not their color description. For example .warning is better than .red_text_with_red_border

You never know if you might decide later on to change your warning text to hot pink (highly unlikely, but possible), and then your class name would be utterly irrelevant and misleading to you as a designer.

My two cents.
  • pbrasilbr_brasil
  • Novice
  • Novice
  • pbrasilbr_brasil
  • Posts: 18
  • Loc: Brazil

Post 3+ Months Ago

Thank you,but..i didn't understood what you meaned...
i taught you didn't gave me a solution for the problem,heh

I will try to explain it english isn't that so good,so maybe we're having mistakes :)

I just want to get able for using different colors on a single style like i have

Code: [ Select ]
.style2 {font-family: Geneva,Arial,Helvetica;
       font-size: x-small;
       font-style: bold;
  1. .style2 {font-family: Geneva,Arial,Helvetica;
  2.        font-size: x-small;
  3.        font-style: bold;
  4.        }

see...".style2" is ready. Now , i want to use any color on style2...not having to create new styles only to have a different text color...i think now i explained it very well,heh...hope you can help me :)

and about the scrollbar...i don't know how,but worked for me dude. Sometimes the external scrollbar CSS worked...i don't know how or why.
For my cousin, it works perfectly...i asked him what was his code, and it was the same code i use...thats strange. :shock:

If you use Dreamweaver, you can see that it doesn't "recognize" the scrollbar tag...
and says there are a lot of compatiblity errors
well...i tested the scrollbar on IE4 and worked...i am using IE4 to test everything i build...if it works on IE4, i am sure the new versions such as IE6 SP1 , or SP2 will work better =)

and...look. To have my scrollbar colored...i do something like this:

Code: [ Select ]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<link rel="stylesheet" href="../style.css" type="text/css">
<title>..| Portal da Piscina |.. - Tudo para o seu lazer na Web!</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

  1. <style>
  2. body{
  10. </style>
  11. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
  12. <html xmlns="">
  13. <head>
  14. <link rel="stylesheet" href="../style.css" type="text/css">
  15. <title>..| Portal da Piscina |.. - Tudo para o seu lazer na Web!</title>
  16. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  17. </head>
  18. <body>

see...i use the <style> before everything...if i use it trough <head> , the scrollbar won't work...
And it sucks, because it removes text format...

for {font-family: Geneva,Arial,Helvetica;} , a "small" size would be cool...but using it before everything, i had to change the size to x-small...because small got so big. Don' t ask me why, i still don't understand...but it is making me :evil:

Well...hope it helps, and thanks for your attention and help (for Joebert too) :)
Pablo =)
  • David
  • Graduate
  • Graduate
  • David
  • Posts: 165

Post 3+ Months Ago

Try out

W3 Schools, they've got some great CSS resources! :-)

  • pbrasilbr_brasil
  • Novice
  • Novice
  • pbrasilbr_brasil
  • Posts: 18
  • Loc: Brazil

Post 3+ Months Ago

Hello dude.
I already know w3schools...but their site never helped me so much.
Really...i read articles there , bla bla bla bla and never get an answer for my problem...

THe scrollbar, i posted a PM for a user that had the same problem , and said to him that i found the solution...i don't have it on hands right now because i'm not on my house,but anyone who needs it i can give it later, no problems :D

And i'm still thinking about the colors problem...i have to solve it,because it makes my CSS greater,because i use different colors and sizes on my site , and i would'nt like to abandon that kind of design
well,thats it. Thank you all for attention and help
Pablo =)

Post Information

  • Total Posts in this topic: 6 posts
  • Users browsing this forum: No registered users and 25 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum

© 1998-2017. Ozzu® is a registered trademark of Unmelted, LLC.