• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 263
  • Last Modified:

CSS with Frontpage 2003 and php

Seanpowell said in a previous question that if I was working with the header, I make the changes there instead of inline

I don't know exactly what I'm talking about, maybe my script will help.



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title></title>
<style type="text/css">

body
{
     margin:0;
     padding:0;
     font:13px arial, verdana, sans-serif;
}

#header
{
     background-color:#cccccc;
     text-align:center;
     height:57px;
}

#header img
{
     display:block;
}

#leftcol
{
     float:left;
     width:32%;
}

#centercol
{
     float:left;
     width:35%;
     text-align:center;
}

#rightcol
{
     float:left;
     width:32%;
}

#footer
{
     background-color:#cccccc;
     text-align:center;
     height:57px;
}

#footer img2
{
     display:block;
}




.spacer
{
     padding:10px 20px;
}

#leftcol p, #rightcol p
{
     text-align:justify;
}

img
{
     border:none;
}

img2
{
     border:none;
}


a:link, a:visited, a:hover, a:active
{
     text-decoration:none;
}

</style>
</head>

<body>
<div id="header" style="width: 989px; height: 111px">
     &nbsp;<img border="0" src="../Smaller-header-for-all-pagesgif.gif" width="780" height="166"></div>

<div id="leftcol">
     <div class="spacer">
            <p align="justify"><font size="2">I </font><font face="Arial" size="2">
            offer really nice home pages and personal pages at the price of $30 a
            site. I start with really nice templates from
            <a href="../boxedart.com">
            BoxedArt</a>, so I am able to keep my prices down.</font></p>
            <p align="justify"><font face="Arial" size="2">I should be able to have
            your site available in one week or less. Send me a payment, then
            <a href="../contact/contact-just-sliced.html">
            contact<span style="text-decoration: none">
            <font color="#000000">me</font></span></a> (if you haven't already) to
            tell me what you want on your site.
            </font></p>
            <p align="justify"><font face="Arial" size="2">I use PayPal for all my
            money transactions, so you have extremely high encryption protecting
            your information.</font></p>
            <p align="justify"><font face="Arial" size="2">PayPal even takes checks,
            but the turnaround time is 1-2 weeks as opposed to 3-4 days for credit
            card purchases.</font></p>
            <p>&nbsp;</p>
            <p>&nbsp;</p>
            <p>&nbsp;</div>
</div>

<div id="centercol" style="width: 346px; height: 255px">
     <div class="spacer">
     <p style="margin-top: -1px; margin-bottom: -1px">&nbsp;</p>
            <p style="margin-top: -1px; margin-bottom: -1px">&nbsp;</p>
            <p style="text-align: justify; margin-top: -1px; margin-bottom: -1px">
            <font face="Arial" size="2">You get one new Yahoo e-mail with
                        each site that you purchase. It's nice to have a couple of
                        e-mails. </font>
                        </p>
            <p style="text-align: justify">
                  <img border="0" src="../man-in-yellow.jpg" width="148" height="107"></p>
                              <p style="margin-top: -1px; margin-bottom: -1px; text-align:justify">
                              <font face="Arial" size="2">Your web site address will be
                              like this:</font></p>
                              <p style="margin-top: -1px; margin-bottom: -1px; text-align:justify">
                              <font face="Arial" size="2">&nbsp;&nbsp;&nbsp;&nbsp;
                              name.B-Transfers.com</font></p>
                              <p style="margin-top: -1px; margin-bottom: -1px; text-align:justify">&nbsp;</p>
                              <p style="margin-top: -1px; margin-bottom: -1px; text-align:justify">
                              <font face="Arial" size="2">Your e-mail will be of the form:</font></p>
                              <p style="margin-top: -1px; margin-bottom: -1px; text-align:justify">
                              <font face="Arial" size="2">&nbsp;&nbsp;&nbsp;&nbsp;
                              <span style="text-decoration: none"><font color="#000000">
                              <a href="mailto:yourname@b-transfers.com">
                              yourname@b-transfers.com</a></font></span></font></p>
                              <p style="margin-top: -1px; margin-bottom: -1px; text-align:justify">&nbsp;</p>
                              <p style="margin-top: -1px; margin-bottom: -1px; text-align:justify">
                              <font face="Arial" size="2">I think you'll like what you get
                              from me.</font></p>
                              <p style="margin-top: -1px; margin-bottom: -1px">&nbsp;</p>
                              <p style="margin-top: -1px; margin-bottom: -1px">&nbsp;</p>
                              <p style="margin-top: -1px; margin-bottom: -1px">&nbsp;<p>&nbsp;</div>
</div>

<div id="rightcol" style="width: 316px; height: 130px">
     <div class="spacer">
     <p style="margin-top: -1px; margin-bottom: -1px">&nbsp;</p>
            <p style="margin-top: -1px; margin-bottom: -1px">
            <font face="Arial" size="2">My name is Bob. I am a web designer that runs
      B-Transfers out of my parent's home. I'm 30 years old and&nbsp; I spend a
      lot of my time running B-Transfers. I like making personal pages.</font></p>
            <p>
      <font face="Arial" size="2">I offer home pages for just about anyone who
      wants one. I also make personal pages for people that have different uses
      for them, like improving your resume.</font></p>
      <p><font face="Arial" size="2">If you are looking for a business site, I
      build them too.&nbsp; Go to
      <a href="../b-transfers.com">B-Transfers.com</a>
      for a business page.</font></p>
      <p>If you still have questions, send me an e-mail through my
      <a href="../contact.html">contact</a> page.<p>&nbsp;</div>
</div>

</body>
</html>
0
weikelbob
Asked:
weikelbob
  • 3
  • 3
1 Solution
 
seanpowellCommented:
Sorry to confuse... what I mean is, instead of doing this:

<div id="header" style="width: 989px; height: 111px">

Change the stylesheet code to this:

#header
{
     background-color:#cccccc;
     text-align:center;
     width: 989px;
     height:111px;
}

and leave the actual div with only the id:

<div id="header">

Does that make sense?
0
 
weikelbobAuthor Commented:
It makes some sense as I am new with CSS. ,It looks good in IE 6.0  but in Netscape 7.1 the header overlaps the body of the page and is justified to the left

Here's a piece of my code, is this right?


<body>


<div id="header">

     &nbsp;<img border="0" src="../Smaller-header-for-all-pagesgif.gif" width="780" height="166"></div>

<div id="leftcol">
0
 
seanpowellCommented:
Almost... like this:

#header
{
     background-color:#cccccc;
     text-align:center;
     height:166px;
     width: 989px;
}

#header img
{
     margin:0 auto;
     display:block;
}

And then:

<div id="header">
     <img border="0" src="../Smaller-header-for-all-pagesgif.gif" width="780" height="166">
</div>

But note that your header is now specified with an exact width (989 pxels) instead of not specifying any width and having it run the full width of the page, which may be better...
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
weikelbobAuthor Commented:
I still cannot get my header to work.
Maybe I should include the code by showing it in pieces.
For now, here's the whole code of my page.
The header does not center in the screen unless I'm in a full page.

Thank you. I'm new to CSS/divs


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title></title>
<style type="text/css">

body
{
     margin:0;
     padding:0;
     font:13px arial, verdana, sans-serif;
}

#header
{
     background-color:#cccccc;
     text-align:center;
     width: 989px;
     height:111px;
}

#header img
{
     display:block;
}

#leftcol
{
     float:left;
     width:32%;
}

#centercol
{
     float:left;
     width:35%;
     text-align:center;
}

#rightcol
{
     float:left;
     width:32%;
}

.spacer
{
     padding:10px 20px;
}

#leftcol p, #rightcol p
{
     text-align:justify;
}

img
{
     border:none;
}

a:link, a:visited, a:hover, a:active
{
     text-decoration:none;
}

</style>
</head>

<body>
<div id="header">
     <p>
            <img border="0" src="../Smaller-header-for-all-pagesgif.gif" width="780" height="166"></div>

<div id="leftcol">
     <div class="spacer">
     <p>I offer really nice home pages and personal pages at the price of $30 a
            site. I start with really nice templates from <a href="boxedart.com">
            BoxedArt</a>, so I am able to keep my prices down.</p>
     <p align="justify">I should be able to have your site available in one week
            or less. Send me a payment, then <a href="contact/contact-just-sliced.html">
            contact</a> me (if you haven't already) to tell me what you want on your
            site.</p>
     <p>I use PayPal for all my money transactions, so you have extremely high
            encryption protecting your information.</p>
     <p>PayPal even takes checks, but the turnaround time is 1-2 weeks as
            opposed to 3-4 days for credit card purchases.</p>
     </div>
</div>

<div id="centercol">
     <div class="spacer">
     <p>You get one new Yahoo e-mail with each site that you purchase. It's nice
            to have a couple of e-mails.</p>
     <p><img src="woman-on-computer.jpg" width="146" height="105"></p>
     <p style="margin-top:60px;">Your web site address will be like this:<br />
     name.B-Transfers.com<br />
     Your e-mail will be of the form:<br />
     <a href="mailto:yourname@b-transfers.com">yourname@b-transfers.com</a></p>
     </div>
</div>

<div id="rightcol">
     <div class="spacer">
     <p>My name is Bob. I am a web designer that runs B-Transfers out of my
            parent's home. I'm 30 years old and&nbsp; I spend a lot of my time
            running B-Transfers. I like making personal pages.</p>
     <p>I offer home pages for just about anyone who wants one. I also make
            personal pages for people that have different uses for them, like
            improving your resume.</p>
     <p>If you are looking for a business site, I build them too. Go to <a href="b-transfers.com">
            B-Transfers.com</a> for a business page.</p>
     <p>If you still have questions, send me an e-mail through my <a href="contact.html">
            contact</a> page.</p>
     </div>
</div>

</body>
</html>
0
 
weikelbobAuthor Commented:
I missed your last comment before I submitted my comment above. I guess the header is set that way on purpose. I'd like it to be centered all of the time.

This works, is it OK to do this?
#header
{
     background-color:#cccccc;
     text-align:center;
     height:166px;
     width: 100%;
}
0
 
seanpowellCommented:
Absolutely - but you shouldn't need the 100%, as that is the default size.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now