...

View Full Version : CSS problem (probably)



Neowulf
02-19-2009, 02:41 PM
my problem is that in some divs (all diws have the same code, same name) my text turn to the default color (declared in the CSS), and my question is why does this happen and how could i fix it.

this is my site: http://siweb.co.nr/,
and this is my included file that contains the divs whit the text: http://siweb.co.nr/FP_inc.html,
and this is a link to my css file: http://siweb.co.nr/styles.css.

please help me :(.

gnomeontherun
02-19-2009, 03:29 PM
CSS allows for property inheritance. What this means is that here


body
{

font: 12px Tahoma, Arial, Helvetica, sans-serif;
color: #003399;
background: #296FC0;
}


you have set the default color for all text. There is a hierarchy where the more specific you get with your declarations, the more specific you declare (instead of the entire document, you can set just one div with the id "left" as you have in your CSS but there is no div with that id?).

So it looks like you have a lot of CSS that doesn't fit your markup.

Excavator
02-19-2009, 05:46 PM
Hello Neowolf,
That site looks alright at 1024px wide but have you seen it at wider resolutions?

Neowulf
02-19-2009, 06:02 PM
CSS allows for property inheritance. What this means is that here


body
{

font: 12px Tahoma, Arial, Helvetica, sans-serif;
color: #003399;
background: #296FC0;
}


you have set the default color for all text. There is a hierarchy where the more specific you get with your declarations, the more specific you declare (instead of the entire document, you can set just one div with the id "left" as you have in your CSS but there is no div with that id?).

So it looks like you have a lot of CSS that doesn't fit your markup.

yes i know that i had a default color declared in the styles.css, i was just wondering why did only specific divs content turn to default text, and yes i really should define only single divs not the entire page your right :D.

thanks for your help jeremywilken :thumbsup:


Hello Neowolf,
That site looks alright at 1024px wide but have you seen it at wider resolutions?

Hello Excavator :)
i know im already working on it (that damn thing always slides to the left :mad:), and thanks for your help Excavator

Neowulf
02-21-2009, 01:11 PM
i removed the body element from the css and colored the divs invidualy as yu said and the divs content at my page top got fixed, but the text content of my right div still turns blue.

what should i do :(

gnomeontherun
02-21-2009, 01:28 PM
If it is an anchor tag (<a>) then you have to style them different from just regular text.

You have a lot of errors in your markup, this is also a problem

http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fsiweb.110mb.com%2F

By the way why are you using Frames so much? I think they cause far too many problems and they are being phased out in HTML.

Neowulf
02-21-2009, 03:29 PM
"Validation Output: 110 Errors " i have lot of work to do :(
but the good news are that i finally fixed the right div thanks to you :D
i did what you said (styled the anchor tag different) and it works :D
(i havent uploaded the new css yet)

this is the code i used:


#tilte_text a:link {color: #FFFFFF}

#tilte_text {color: #FFFFFF}

#tilte_text a:hover {color: #FFFFFF}

#tilte_text a:active {color: #FFFFFF}

#tilte_text
{
color: #FFFFFF;
font-size: 20px;
}

thanks again jeremywilken :thumbsup:



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum