I am kinda new to CSS. I am a student at a charter school learning to be come a programmer. Right now we are making Web Portfolios. Anyway, I am using PHP/CSS for my website and I need a little help. My background for my website is black, and it works fine in Firefox. But for some reason when I open my web page in IE the background is white! I have done a ton of searching and no luck thus far. (I have the the most recent versions of both Firefox and IE) Here is my code:
My CSS Style Sheet:
body
{
background: #000000;
font-family: arial;
}
div.transbox
{
width: 700px;
background-color: #B5B5B5;
/* for IE */
filter:alpha(opacity=90);
/* CSS3 standard */
opacity:0.9
/* for Mozilla */
-moz-opacity:0.9
}
div.transbox p
{
margin: 30px 40px;
}....
My Index Page:
<?php
include ('./includes/header.html');
?>
s923 - Home
Welcome!
....
So if you could please help me thanks! If you need some more code from my website or a screenshot please ask.
try... body{background-color:
try...
body
{
background-color: #000000;
font-family: arial;
}
Still didn't work
ok so did that and i still have the white background in IE.
Then please show us all your
Then please show us all your code, because all we can do is make shots in the dark without it.
Make sure your DTD is
Make sure your DTD is declared on your index page so IE doesn't go "quirky" on you
DTD?
DTD?
I'll give you an
I'll give you an example:
this comes at the beginning of an index page:
Not necessarily XHTML.. So it depends on what version of HTML you're using
Deuce wrote:Then please show
Then please show us all your code, because all we can do is make shots in the dark without it.
I know I will, im just
I know I will, im just really busy today.
Himura251 wrote:I know I
I know I will, im just really busy today.
Just saving that answer for when you really, really need help.

Code
Ok so here is my CSS Style Sheet and my Index page code:
CSS
body
{
background-color: #000000;
font-family: arial;
}
div.transbox
{
width: 700px;
background-color: #B5B5B5;
/* for IE */
filter:alpha(opacity=90);
/* CSS3 standard */
opacity:0.9
/* for Mozilla */
-moz-opacity:0.9
}
div.transbox p
{
margin: 30px 40px;
}
p {color:black; margin-left: 15px; font-size:10pt;}
a:link {color:black}
a:visited {color:black}
a:active {color:black}
Index Page
<?php
include ('./includes/header.html');
?>
s923 - Home
Welcome!
Welcome to my portfolio website.
<?php
include ('./includes/footer.html');
?>
please post your parsed html
please post your parsed html
parsed?
parsed?
HTML, not PHP
as in, not this:
<?php
include ('./includes/header.html');
?>
View the page in a browser, view source, paste that in here
ok
ok

s923 - Home
Welcome!
Welcome to my portfolio website.
Why is your doctype in three
Why is your doctype in three lines and your html in two?
I dunno if that's valid or not.
why do you have two opening html tags?
why do you have two ending html tags?
?
What? I don't understand.
Validate your code first.
Validate your code first. You can't have two opening HTML tags.
yeah I saw that, I fixed it
yeah I saw that, I fixed it and still nothing new.
Have you got it online
Have you got it online anywhere?
If not, could you post your latest version of the CSS and HTML please?
Ok
ok, Yes I have tested it online, I am using Xamp, and I tested it on my web server. here is the code...
CSS
body
{
background-color: #000000;
font-family: arial;
}
div.transbox
{
width: 700px;
background-color: #B5B5B5;
/* for IE */
filter:alpha(opacity=90);
/* CSS3 standard */
opacity:0.9
/* for Mozilla */
-moz-opacity:0.9
}
div.transbox p
{
margin: 30px 40px;
}
p {color:black; margin-left: 15px; font-size:10pt;}
a:link {color:black}
a:visited {color:black}
a:active {color:black}
Index HTML
<?php
include ('./includes/header.html');
?>
s923 - Home
Welcome!
Welcome to my portfolio website.
<?php
include ('./includes/footer.html');
?>
Deuce wrote:please post your
please post your parsed html
you've still got two opening
you've still got two opening HTML tags.
I already fixed the open
I already fixed the open html tags. Where do you see them?

s923 - Home
Welcome!
Welcome to my portfolio website. This website allows me to share my classes, my work, and projects that I have completed while at Meridian Technical Charter High School.
Read that code you have
Read that code you have posted carefully, and you'll see two opening html tags.
thepineapplehead
Validate your code first...
<!DOCTYPE html PUBLIC
<?php
include ('./includes/header.html');
?>
s923 - Home
Welcome!
Welcome to my portfolio website.
<?php
include ('./includes/footer.html');
?>
there.
You need to remove this bit:
<?php
include ('./includes/header.html');
?>
s923 - Home
Welcome!
Welcome to my portfolio website.
<?php
include ('./includes/footer.html');
?>
as it seems to be redundant - header.html takes care of it.
but don't I need that stuff
but don't I need that stuff for my style sheet to work on my pages? and I still don't see the open html tags.
Himura251 wrote:but don't I
but don't I need that stuff for my style sheet to work on my pages? and I still don't see the open html tags.
*sigh* Ever try the find function?
<html xmlns+"http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<?php
include ('./includes/header.html');
?>
<html>
s923 - Home
...
I've figured it out. Use
I've figured it out.
Use this code instead:
s923 - Home
<?php
include ('./includes/header.html');
?>
Welcome!
Welcome to my portfolio website.
<?php
include ('./includes/footer.html');
?>
YA!
YES! Hey it worked! Thanks!
Has it fixed the IE problem?
Has it fixed the IE problem?
Yep
Yep! works perfect now! Thanks!