Solved

CSS with Frontpage 2003 and php

Posted on 2004-08-17
6
248 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
  • 3
  • 3
6 Comments
 
LVL 31

Expert Comment

by:seanpowell
Comment Utility
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
Comment Utility
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
Comment Utility
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
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 7

Author Comment

by:weikelbob
Comment Utility
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
Comment Utility
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
Comment Utility
Absolutely - but you shouldn't need the 100%, as that is the default size.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
element on site jumps 4 35
Problem to ToolkitScriptManager 2 26
Menu Inconsistent 3 18
Best Practice CSS floating images 2 14
When applying CSS to your HTML, there are many different ways to select which element(s) the CSS applies to.  Some of these selectors are more commonly known and used than others - Here are the more common ones: #X - Matches an ID of X .X - Matche…
Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…

728 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now