Click here to Skip to main content
15,899,937 members
Home / Discussions / Web Development
   

Web Development

 
AnswerRe: CMS Pin
Jules VDV3-Nov-10 9:10
Jules VDV3-Nov-10 9:10 
QuestionCSS Horizontal Menu Pin
Patrick Skelton2-Nov-10 5:06
Patrick Skelton2-Nov-10 5:06 
AnswerRe: CSS Horizontal Menu Pin
cjoki2-Nov-10 8:22
cjoki2-Nov-10 8:22 
GeneralRe: CSS Horizontal Menu Pin
Patrick Skelton3-Nov-10 9:31
Patrick Skelton3-Nov-10 9:31 
Question500-inernal server error . Pin
Davood Riazi30-Oct-10 22:39
Davood Riazi30-Oct-10 22:39 
AnswerRe: 500-inernal server error . Pin
Dalek Dave31-Oct-10 4:15
professionalDalek Dave31-Oct-10 4:15 
AnswerREPOST Pin
Not Active31-Oct-10 4:27
mentorNot Active31-Oct-10 4:27 
QuestionCSS Selector Problem Pin
Patrick Skelton28-Oct-10 6:00
Patrick Skelton28-Oct-10 6:00 
Hi,

I am having trouble getting a CSS selector to hit a target. The included HTML and CSS showing an image inside some layout divs. I have been trying to separate colour from layout using classes, and this seemed to work fine until I got to the problem of separating the colour of the border on the image. As the files stand, the image has the border colour I want, but if I comment out the line labelled 'Can't separate this colour' the image gets a white border from somewhere. Though I have tried adding both a class and an ID to the img, these seem to be ignored.

Why are these lines being ignored? And where is the image inheriting its border colour from?

I have experimented with many ways of trying to separate the border colour for the image into its own CSS rule, but none of them works. It seems that the colour has to be in the same rule as the border width to work.

I confess to struggling with CSS at the best of times, but this seems such a simple thing. Can anyone tell me what I am missing, and - hopefully - come up
with a way of allowing me to specify the colour of the image's border in a separate rule to the border itself?

Any help would be very much appreciated.

Best wishes, Patrick


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-gb">
<head runat="server">
	<link rel="stylesheet" type="text/css" href="Screen.css" media="screen" />
</head>
<body class="baseColour">

	<form id="homePage" class="borderOutlineColour" runat="server">
		<div id="headerOuterContainer" class="borderColour">
			<div id="headerLogo">
				<img id="doesNotWorkID" class="doesNotWorkClass" src="NonExistantImage.jpg" height="100px" width="100px" />
			</div>
			<div class="clear">
			</div>
		</div>
	</form>

</body>
</html>



body
{
	font-family: arial, helvetica, sans-serif;
	padding: 10px;
}

.clear
{
	clear: both;
}

#homePage
{
	width: auto;
	border-style: solid;
	border-width: 2px;
}

#headerOuterContainer
{
	border-style: solid;
	border-top-width: 0;
	border-bottom-width: 0;
	border-left-width: 150px;
	border-right-width: 150px;
	z-index: 3;
}

#headerLogo
{
	float: left;
	position: relative;
	z-index: 20;
	margin-top: 0;
	margin-right: 1px;
	margin-bottom: 0;
	margin-left: -150px;
	height: 150px;
	width: 150px;
}

.baseColour
{
	background-color: black;
	color: white;
}

.borderOutlineColour
{
	border-color: rgb( 246, 199, 21 );
}

.borderColour
{
	background-color: rgb( 15, 10, 100 );
	border-color: rgb( 15, 10, 100 );
}

#headerLogo img
{
	border: 2px solid;
	border-color: rgb( 246, 199, 21 ); /* Can't separate this colour. */
}

#doesNotWorkID
{
	border-color: rgb( 246, 199, 21 );
}

.doesNotWorkClass
{
	border-color: rgb( 246, 199, 21 );
}

AnswerRe: CSS Selector Problem Pin
Manfred Rudolf Bihy28-Oct-10 7:04
professionalManfred Rudolf Bihy28-Oct-10 7:04 
GeneralRe: CSS Selector Problem Pin
Patrick Skelton28-Oct-10 8:44
Patrick Skelton28-Oct-10 8:44 
GeneralRe: CSS Selector Problem Pin
Manfred Rudolf Bihy28-Oct-10 11:57
professionalManfred Rudolf Bihy28-Oct-10 11:57 
GeneralRe: CSS Selector Problem Pin
Patrick Skelton28-Oct-10 23:22
Patrick Skelton28-Oct-10 23:22 
GeneralRe: CSS Selector Problem [modified] Pin
Manfred Rudolf Bihy29-Oct-10 1:25
professionalManfred Rudolf Bihy29-Oct-10 1:25 
GeneralRe: CSS Selector Problem Pin
Patrick Skelton2-Nov-10 3:17
Patrick Skelton2-Nov-10 3:17 
QuestionIncrease your webpage performance by using 80/20 rule of Vilfredo Pareto Pin
Sunasara Imdadhusen27-Oct-10 22:45
professionalSunasara Imdadhusen27-Oct-10 22:45 
QuestionYahoo. Google Oauth APIs.. Pin
Lijo Rajan27-Oct-10 4:07
Lijo Rajan27-Oct-10 4:07 
QuestionHtml element tooltip / title attribute in Opera kioskmode not showing? [modified] Pin
rolfhorror22-Oct-10 22:37
rolfhorror22-Oct-10 22:37 
QuestionNeed help on Windows Mobile 5.0 [modified] Pin
Rahul Chitte22-Oct-10 5:36
Rahul Chitte22-Oct-10 5:36 
QuestionSSL, but not via a web server Pin
TimWallace21-Oct-10 5:53
TimWallace21-Oct-10 5:53 
AnswerRe: SSL, but not via a web server Pin
Rob Smiley21-Oct-10 6:26
Rob Smiley21-Oct-10 6:26 
Questionie css display issue, I need advice Pin
cjoki15-Oct-10 3:30
cjoki15-Oct-10 3:30 
AnswerRe: ie css display issue, I need advice Pin
phil.o15-Oct-10 4:15
professionalphil.o15-Oct-10 4:15 
GeneralRe: ie css display issue, I need advice Pin
cjoki15-Oct-10 4:40
cjoki15-Oct-10 4:40 
GeneralRe: ie css display issue, I need advice Pin
phil.o15-Oct-10 5:10
professionalphil.o15-Oct-10 5:10 
GeneralRe: ie css display issue, I need advice Pin
cjoki15-Oct-10 5:57
cjoki15-Oct-10 5:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.