![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I'm trying to get a 1px solid #fff border-bottom on my h1 elements, |
|
however no matter what I do it won't appear. |
|
h1{ font-size: 40px; color: #FFFFFF; border-bottom: 1px solid #ffffff; width: 100%; } |
#3
| |||
| |||
|
|
awec wrote: I'm trying to get a 1px solid #fff border-bottom on my h1 elements, It's somewhat questionable as a goal, since underlining generally means link on the Web and bottom border looks much like underline (though it's somewhat different). This might not be serious if the border extends over the entire width of the document's body element, as it does by default when set on a block element. however no matter what I do it won't appear. URL? IE version? h1{ font-size: 40px; color: #FFFFFF; border-bottom: 1px solid #ffffff; width: 100%; } The entire heading is invisible if the background is white, as it usually is by default. Didn't your mom... I mean the CSS tutorial you read teach you to set background whenever you set color and vice versa? With background set to something dark, I have no problems in seeing the border on my IE 8. There's something you're not telling us. And the URL is one of those things. |
#4
| |||
| |||
|
|
all. I want the border-bottom to be the entire width, not just under the text. |
#5
| |||
| |||
|
|
1. Url: http://threepints.co.uk/web/1/# |
|
4. Background color is set in body{}. |
|
I am not an idiot, |
#6
| |||
| |||
|
|
The entire heading is invisible if the background is white, as it usually is by default. Didn't your mom... I mean the CSS tutorial you read teach you to set background whenever you set color and vice versa? |
|
3. Your attempted humour at bringing my "mom" into this is actually not funny at all. |
|
4. Background color is set in body{}. I am not an idiot, so your sarcasm is wasted on me. |
#7
| |||
| |||
|
|
I think Jukka may have meant to say Google and other SEs. |
|
If the text is the same color as the body, a site is penalized and removed from the index. |
|
4. Background color is set in body{}. I am not an idiot, so your sarcasm is wasted on me. Although the background color is set in the body, I always include either the background color itself, or set the background color to transparent when ever I set a color on an element. |
#8
| ||||
| ||||
|
|
Adrienne Boswell wrote: I think Jukka may have meant to say Google and other SEs. No, I didn't. I simply referred to the risk that text color and background color might coincide or bee too close to each other or an otherwise unsuitable combination. |
|
If the text is the same color as the body, a site is penalized and removed from the index. Maybe in some cases, but I don't think search engines process CSS. They have been claimed to pay attention to coloring with HTML markup, in order to detect tricks like "invisible" text used to fool search engines. It would be essentially more complicated to detect such things in CSS. Not impossible, tough. |
|
4. Background color is set in body{}. I am not an idiot, so your sarcasm is wasted on me. Although the background color is set in the body, I always include either the background color itself, or set the background color to transparent when ever I set a color on an element. The background of the body element is the background of that element only. Inner elements have backgrounds of their own, and if they are transparent, the body background shines through. This creates the impression of inheritance, even though background properties do not inherit. Setting background for every element if you set color for it is a simple and useful precaution. Making it transparent is risky, though perhaps a risk worth taking if the safer way would be too cumbersome. |
|
Consider this: body { background: #fff; color: #000; } h1 { background: transparent; color: #600; } Now consider the following user stylesheet (say, for a person suffering from a rare eyesight problem where white on black actually helps): body { background: #200 !important; color: #fff !important; } This user stylesheet is not optimal, since it does not set colors for any inner elements, but it makes sense and you cannot say that it is wrong. (Everyone surely figured out what happens?) |
#9
| |||
| |||
|
|
awec wrote: (fullquote, always a useful cluelessness indicator) 1. Url: http://threepints.co.uk/web/1/# Didn't your mom... I mean HTML primer tell you to validate your markup at least before posting a question about your page in a public forum? 4. Background color is set in body{}. Maybe, maybe not. It wasn't in the code you originally posted. I am not an idiot, Then stop behaving like one. Wouldn't be usenet without the resident know it all sarcastic fool now |
#10
| |||
| |||
|
|
Don't worry, the "your mom" statements give me an indication of your mental age so I'll say no more for fear of upsetting you. |
![]() |
| Thread Tools | |
| Display Modes | |
| |