32 replies [Last post]
Himura251
Himura251's picture
Offline
Regular
Idaho
Last seen: 12 years 41 weeks ago
Idaho
Joined: 2007-10-24
Posts: 14
Points: 0

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.

Deuce
Deuce's picture
Offline
Guru
Somewhere, USA
Last seen: 3 years 3 weeks ago
Somewhere, USA
Timezone: GMT-5
Joined: 2005-11-20
Posts: 4424
Points: 1843

try... body{background-color:

try...
body
{
background-color: #000000;
font-family: arial;
}

all » http://dictionary.reference.com/browse/all

Google isn't a bunch of guys reading and grading web sites, it's more like a bunch of monkeys sniffing food and putting the good bananas at the top. -Triumph

Himura251
Himura251's picture
Offline
Regular
Idaho
Last seen: 12 years 41 weeks ago
Idaho
Joined: 2007-10-24
Posts: 14
Points: 0

Still didn't work

ok so did that and i still have the white background in IE.

Deuce
Deuce's picture
Offline
Guru
Somewhere, USA
Last seen: 3 years 3 weeks ago
Somewhere, USA
Timezone: GMT-5
Joined: 2005-11-20
Posts: 4424
Points: 1843

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.

all » http://dictionary.reference.com/browse/all

Google isn't a bunch of guys reading and grading web sites, it's more like a bunch of monkeys sniffing food and putting the good bananas at the top. -Triumph

johnamadeus
Offline
newbie
Last seen: 12 years 39 weeks ago
Joined: 2007-10-24
Posts: 5
Points: 0

Make sure your DTD is

Make sure your DTD is declared on your index page so IE doesn't go "quirky" on you Wink

Himura251
Himura251's picture
Offline
Regular
Idaho
Last seen: 12 years 41 weeks ago
Idaho
Joined: 2007-10-24
Posts: 14
Points: 0

DTD?

DTD?

johnamadeus
Offline
newbie
Last seen: 12 years 39 weeks ago
Joined: 2007-10-24
Posts: 5
Points: 0

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
Deuce's picture
Offline
Guru
Somewhere, USA
Last seen: 3 years 3 weeks ago
Somewhere, USA
Timezone: GMT-5
Joined: 2005-11-20
Posts: 4424
Points: 1843

Deuce wrote:Then please show

Deuce wrote:
Then please show us all your code, because all we can do is make shots in the dark without it.

all » http://dictionary.reference.com/browse/all

Google isn't a bunch of guys reading and grading web sites, it's more like a bunch of monkeys sniffing food and putting the good bananas at the top. -Triumph

Himura251
Himura251's picture
Offline
Regular
Idaho
Last seen: 12 years 41 weeks ago
Idaho
Joined: 2007-10-24
Posts: 14
Points: 0

I know I will, im just

I know I will, im just really busy today.

Triumph (not verified)
Anonymous's picture
Guru

Himura251 wrote:I know I

Himura251 wrote:
I know I will, im just really busy today.

Just saving that answer for when you really, really need help. Tongue

Himura251
Himura251's picture
Offline
Regular
Idaho
Last seen: 12 years 41 weeks ago
Idaho
Joined: 2007-10-24
Posts: 14
Points: 0

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');
?>

Deuce
Deuce's picture
Offline
Guru
Somewhere, USA
Last seen: 3 years 3 weeks ago
Somewhere, USA
Timezone: GMT-5
Joined: 2005-11-20
Posts: 4424
Points: 1843

please post your parsed html

please post your parsed html

all » http://dictionary.reference.com/browse/all

Google isn't a bunch of guys reading and grading web sites, it's more like a bunch of monkeys sniffing food and putting the good bananas at the top. -Triumph

Himura251
Himura251's picture
Offline
Regular
Idaho
Last seen: 12 years 41 weeks ago
Idaho
Joined: 2007-10-24
Posts: 14
Points: 0

parsed?

parsed?

thepineapplehead
thepineapplehead's picture
Offline
Guru
Last seen: 20 weeks 2 days ago
Joined: 2004-06-30
Posts: 9668
Points: 801

HTML, not PHP

as in, not this:

<?php include ('./includes/header.html'); ?>

View the page in a browser, view source, paste that in here Wink

Verschwindende wrote:
  • CSS doesn't make pies

Himura251
Himura251's picture
Offline
Regular
Idaho
Last seen: 12 years 41 weeks ago
Idaho
Joined: 2007-10-24
Posts: 14
Points: 0

ok

ok















s923 - Home

Welcome!

Welcome to my portfolio website.









Deuce
Deuce's picture
Offline
Guru
Somewhere, USA
Last seen: 3 years 3 weeks ago
Somewhere, USA
Timezone: GMT-5
Joined: 2005-11-20
Posts: 4424
Points: 1843

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?

all » http://dictionary.reference.com/browse/all

Google isn't a bunch of guys reading and grading web sites, it's more like a bunch of monkeys sniffing food and putting the good bananas at the top. -Triumph

Himura251
Himura251's picture
Offline
Regular
Idaho
Last seen: 12 years 41 weeks ago
Idaho
Joined: 2007-10-24
Posts: 14
Points: 0

?

What? I don't understand.

thepineapplehead
thepineapplehead's picture
Offline
Guru
Last seen: 20 weeks 2 days ago
Joined: 2004-06-30
Posts: 9668
Points: 801

Validate your code first.

Validate your code first. You can't have two opening HTML tags.

Verschwindende wrote:
  • CSS doesn't make pies

Himura251
Himura251's picture
Offline
Regular
Idaho
Last seen: 12 years 41 weeks ago
Idaho
Joined: 2007-10-24
Posts: 14
Points: 0

yeah I saw that, I fixed it

yeah I saw that, I fixed it and still nothing new.

thepineapplehead
thepineapplehead's picture
Offline
Guru
Last seen: 20 weeks 2 days ago
Joined: 2004-06-30
Posts: 9668
Points: 801

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?

Verschwindende wrote:
  • CSS doesn't make pies

Himura251
Himura251's picture
Offline
Regular
Idaho
Last seen: 12 years 41 weeks ago
Idaho
Joined: 2007-10-24
Posts: 14
Points: 0

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
Deuce's picture
Offline
Guru
Somewhere, USA
Last seen: 3 years 3 weeks ago
Somewhere, USA
Timezone: GMT-5
Joined: 2005-11-20
Posts: 4424
Points: 1843

Deuce wrote:please post your

Deuce wrote:
please post your parsed html

all » http://dictionary.reference.com/browse/all

Google isn't a bunch of guys reading and grading web sites, it's more like a bunch of monkeys sniffing food and putting the good bananas at the top. -Triumph

thepineapplehead
thepineapplehead's picture
Offline
Guru
Last seen: 20 weeks 2 days ago
Joined: 2004-06-30
Posts: 9668
Points: 801

you've still got two opening

you've still got two opening HTML tags.

Verschwindende wrote:
  • CSS doesn't make pies

Himura251
Himura251's picture
Offline
Regular
Idaho
Last seen: 12 years 41 weeks ago
Idaho
Joined: 2007-10-24
Posts: 14
Points: 0

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.







Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 5 years 30 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

Read that code you have

Read that code you have posted carefully, and you'll see two opening html tags.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

Triumph (not verified)
Anonymous's picture
Guru

thepineapplehead

thepineapplehead wrote:
Validate your code first...

thepineapplehead
thepineapplehead's picture
Offline
Guru
Last seen: 20 weeks 2 days ago
Joined: 2004-06-30
Posts: 9668
Points: 801

<!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.

Verschwindende wrote:
  • CSS doesn't make pies

Himura251
Himura251's picture
Offline
Regular
Idaho
Last seen: 12 years 41 weeks ago
Idaho
Joined: 2007-10-24
Posts: 14
Points: 0

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.

Triumph (not verified)
Anonymous's picture
Guru

Himura251 wrote:but don't I

Himura251 wrote:
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?

thepineapplehead wrote:

<html xmlns+"http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<?php
include ('./includes/header.html');
?>

<html>

s923 - Home

...

thepineapplehead
thepineapplehead's picture
Offline
Guru
Last seen: 20 weeks 2 days ago
Joined: 2004-06-30
Posts: 9668
Points: 801

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');
?>

Verschwindende wrote:
  • CSS doesn't make pies

Himura251
Himura251's picture
Offline
Regular
Idaho
Last seen: 12 years 41 weeks ago
Idaho
Joined: 2007-10-24
Posts: 14
Points: 0

YA!

YES! Hey it worked! Thanks!

thepineapplehead
thepineapplehead's picture
Offline
Guru
Last seen: 20 weeks 2 days ago
Joined: 2004-06-30
Posts: 9668
Points: 801

Has it fixed the IE problem?

Has it fixed the IE problem?

Verschwindende wrote:
  • CSS doesn't make pies

Himura251
Himura251's picture
Offline
Regular
Idaho
Last seen: 12 years 41 weeks ago
Idaho
Joined: 2007-10-24
Posts: 14
Points: 0

Yep

Yep! works perfect now! Thanks!