Weird Weird problem with HTML and CSS

Permabanned
Joined
22 Apr 2007
Posts
1,805
Hi guys, I'm sure I'm loosing my mind.

If you just create a simple document like this:-

Code:
<html>
<head>
</head>

<body>
Test
</body>
</html>

and upload it, what colour would you expect the background to be?

More so, if you uploaded this:-

Code:
<html>
<head><style type="text/css">
<!--
BODY {
     background-image: url(images/bg.jpg);
     background-repeat: no-repeat;
}
-->
</style>
</head>

<body>
Test
</body>
</html>

and you created a folder called 'images' and uploaded the bg.jpg file, you'd expect to see the image on the background right?

Ok, so explain this to me

www.azurejewels.co.uk
 
Hmm, changed it to a gif and it seems to have sorted itself but why is the background a greyish colour?

The only colours in the images are the reds. It should appear, in theory, on a white background.
 
Are you sure the grey background isn't the transparency of the GIF not showing correctly?

(I should probably say; I can't view your website)
 
Are you sure the grey background isn't the transparency of the GIF not showing correctly?

(I should probably say; I can't view your website)

Well, I wondered that, but even with no images and no link to images, just pure HTML shows a tinge of grey in the background (compared to the white of google for example)
 
Well I can't advise much without seeing your html coding or being able to read the source.

What browser are you previewing it through?
 
IE7.

I'm getting roughly were I want to be now

HTML is here

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" type="text/css" href="screen.css" media="screen" />
</head>

<body>
<div id="wrapper"><!--start wrapper-->
<div id="content">
<div id="main-content">
<h1>Welcome to Azure Jewels</h1>
<p>This site is currently under development. Please check back here for updates</p>
</div><!--end main-content-->
</div>
</div><!--end wrapper-->
</body>
</html>

and CSS is here (so far)

Code:
/* CSS Document */

body{		
background-image: url(images/bg.gif);	
background-repeat:repeat;*/	
padding:0px;	
margin:0px;	
}

#wrapper{	
width:700px;	
background-color:#FFF;	
font-family:Verdana, Arial, Helvetica, sans-serif;	
font-size:11px;	
filter:alpha(opacity=65);
opacity: 0.65;
-moz-opacity:0.65;
margin-top:20px;	
margin-left:auto;	
margin-right:auto;	
padding:12px;	
border: solid 2px #E5E5E5;	
}

#content{	
float:left;
}

#main-content{	
float:left;	
width:690px;	
margin-top:5px;	
padding:5px;	
/*border-right: solid 1px #d9d9d9;*/	
}	

#main-content p{	
padding-right:0px;	
}			

#main-content h1{	
color: #000;	
font-size:20px;	
font-family:Calibri, Arial, Helvetica, sans-serif;	
font-weight:bolder;	
margin-bottom:0px;	
width:310px;	
border-bottom:1px solid #ABABAB;	
padding-left:2px;	
}

Site is as per post one

Can't you see the source through that?
 
Site is as per post one

Can't you see the source through that?
No, site doesn't load for me.

Are you still getting the grey background issue? It could be to do with the opacity you have set in your wrapper stryle in your css file.
 
Thats what I'm saying, even without all the CSS junk and any images, I wrote code like this

Code:
<html>
<head></head>
<body>
test
</body>
</html>

and it appeared on a grey background. There was no image folder, no CSS nothing.
 
What are you using to code your HTML? Have you tried just creating a notepad file containing that HTML code and re-name it to a .HTML extension? (Trying to invoke the possibility that whatever program it is that you are using (Frontpage, Dreamweaver etc) is altering the code as you save)

Otherwise, it's the way you have IE setup to display it. There surely can be no other explanation. Unless it's an issue which I am not aware with, or surpasses my coding knowledge.
 
Back
Top Bottom