Home Page Background Color Quandary

liunx

Guest
My site is created in MS Publisher, which does not allow for multiple background page colors, which I am trying to accomplish. I would like my home page to have a black background; & all the others a white background. WYSIWYG I know...HTML I do not (well...some.)<br />
<br />
I thought I had accomplished this by framing the home page with a picture box; & then flood filling that frame with black (after layering all my graphics & text forward.) When I previewed the site in my browser (IE), it looked great. I converted the site to HTML & uploaded to my server; & what is happening with the home page is: when the site is logged onto, the page background is white for a moment; & then becomes black, which doesn't look very professional.<br />
<br />
My question is: If I remove the black flood fill from my home page; & then, for that page, follow the standard rule, which I believe would be BGCOLOR=black (in the BODY tag between the entries BODY & >), will that work? Or is there something else I am missing?<br />
<br />
Thanks in advance,<br />
<br />
mark4man<!--content-->Originally posted by Dave Clark <br />
<br />
though it is possible some smart@$$ may come along and say that you should specify your colors via CSS styles -- not in the BODY tag's attributes.<br />
<br />
Dave [/B] <br />
<br />
Of cource dope heads still living in the 1990ies are obvously not familear with that you can specify CSS inline as a "BODY tag attribute".<br />
<br />
<body style="background:black; color:white"><br />
<br />
Which method you end up using pretty much depends on if you would like to learn how people USED to code webpages or how to do it in the future.<br />
Currently we are at a crosspoint in time where people are slowly moving from the old way to the new way so either method will work just fine. :)<!--content-->Dave,<br />
<br />
Thanks much. Question, tho: Why the entry for text directly after the entry for bgcolor?<br />
<br />
Stefan,<br />
<br />
Thanks much. Question, tho: Why the entry for color (white) directly after the entry for background (black)?<br />
<br />
<br />
Question for both you guys (without starting a major ruckus):<br />
<br />
Which system (structured code vs. styles) is better? Or is it...I've always understood that ideally it's a combination of the two...straight code for standard formatting & css for aesthetic design. How about browser compatibility?<br />
<br />
Thanks in advance,<br />
<br />
mark4man<!--content-->At the risk of sounding like a total homer...I must tell you:<br />
<br />
IT WORKED! IT WORKED! IT REALLY FR_ _ _KIN' WORKED! I'M SO FR_ _ KIN' HAPPY!<br />
<br />
First of all, Publisher must generate in css, because I found this entry just below <title>:<br />
<br />
<style type="text/css"><!--<br />
<br />
(I have this feeling I should have known this already.)<br />
<br />
The <BODY> tag was below the </style> tag, near the middle of the page; & below all the headings (which incidently, from Publisher, look like:<br />
<br />
#NormalP {<br />
text-align: left;<br />
margin-top: 0.0pt;<br />
margin-bottom: 0.0pt;<br />
}<br />
<br />
#PubSt1F {<br />
PublisherStyleName: PubSt1;<br />
font-family: Times New Roman;<br />
font-size: 4.0pt;<br />
color: #000000;<br />
<br />
(as opposed to: <H1>) That's weird. Is that what is meant by "bloating" the code?<br />
<br />
The entry was: <body bgcolor="#FFFFFF" link="#0066ff" vlink="#cc3366" text="#000000" topmargin=0 leftmargin=0>, which I changed to: #000000, per your recommendation [& I had also found it last night in Elizabeth Castro's book (HTML4.)]<br />
<br />
Now, I have to find the code generated by the flood filled frame I created in the damn WYSIWYG app to get my black page in the first place...& delete it.<br />
<br />
In the future, I'll leave all my pages standard white in the editor & just change the code. I'm also going to make a honest effort to learn HTML. I like WYSIWYG, for the aesthetic freedom associated with visual page layout, but there's just no substitute for understanding the structure behind it all.<br />
<br />
Thanks again,<br />
<br />
mark4man<!--content-->Originally posted by mark4man <br />
Dave,<br />
Why the entry for color (white) directly after the entry for background (black)?<br />
<br />
<br />
I was providing the equivalent of the code posted by Dave and just as he said the important thing here is to provide a contrasting color.<br />
Some visitors might be using custom colors for text and background and if you just specify 1 of them it might turn the page unreadable for them.<br />
<br />
<br />
Which system (structured code vs. styles) is better?<br />
<br />
<br />
In your very simple example the 2 codes are pretty much equal.<br />
However the real benefit of CSS is that you can compleatly separate the webpage content from the style & formating by placing all style code in an externally linked file.<br />
This means that you can controll every detail of your entire site from 1 single file.<br />
If you eg have 10 pages and want to change the background from black to grey, you just change 1 value in this 1 file and each of the 10 pages is instantly updated.<br />
It saves a lot of time when making your website as well as maintaining it and additionally you neve risk forgetting to update 1 of the pages.<br />
<br />
Also, since you don't need to provide the same style and formating information on each page of your site, the entire site will also be quicker for visitors to Download <!--more--> and require less bandwidth.<br />
<br />
There are other benefits with using CSS too, but the above is usually more then enough to make people realize that they really want to use CSS.<br />
<br />
<br />
How about browser compatibility?<br />
<br />
<br />
Simple things like text and backgrounds work quite well even in old browsers like NS 4 and IE 4.<br />
The newer the browser the more advanced stuff you can do with CSS.<br />
With eg Opera 7beta, IE6 and Mozilla (NS 7) you can easily replicate in just a few lines of code what used to require large DHTML scripts, eg like popup menus.<!--content-->
 
Back
Top