Solved

CSS with Frontpage 2003 and php

Posted on 2004-08-17
6
252 Views
Last Modified: 2012-05-05
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
Comment
Question by:weikelbob
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 31

Expert Comment

by:seanpowell
ID: 11826193
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
 
LVL 7

Author Comment

by:weikelbob
ID: 11826375
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
 
LVL 31

Expert Comment

by:seanpowell
ID: 11826451
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 7

Author Comment

by:weikelbob
ID: 11827646
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
 
LVL 7

Author Comment

by:weikelbob
ID: 11827659
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
 
LVL 31

Accepted Solution

by:
seanpowell earned 125 total points
ID: 11829655
Absolutely - but you shouldn't need the 100%, as that is the default size.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As a result of several questions about how to use Bootstrap I thought it would be a good idea to write down the development aspect of creating a Bootstrapped website in as little time as possible. Part 1 of this article will only concentrate on g…
CSS is a visual language used to classify objects and define rules about how they should be displayed. CSS skills aren’t restricted to developers anymore, there is a big benefit to having a basic understanding of the language, regardless of your occ…
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question