www.webdeveloper.com
Results 1 to 4 of 4

Thread: styles help

  1. #1
    Join Date
    Apr 2006
    Posts
    2

    styles help

    Need some help with html, particularly with styles (see code below)
    I have some style definitions in things like this:
    body {
    whatever
    }

    and some in this:
    <!--
    @page: bla bla bla
    -->

    Do i need both of these?



    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML>
    <HEAD>
    <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=utf-8">
    <TITLE></TITLE>
    <META NAME="GENERATOR" CONTENT="OpenOffice.org 2.0 (Linux)">
    <META NAME="AUTHOR" CONTENT="anonymous">
    <META NAME="CREATED" CONTENT="20060327;12053100">
    <META NAME="CHANGEDBY" CONTENT="anonymous">
    <META NAME="CHANGED" CONTENT="20060401;11510300">
    <STYLE>
    <!--
    @page { size: 8.5in 11in; margin: 0.79in }
    P { margin-bottom: 0.08in; color: #ffffff; font-family: "Arial", "Helvetica", sans-serif; text-decoration: none }
    TD P { margin-bottom: 0.08in; color: #ffffff; font-family: "Arial", "Helvetica", sans-serif; text-decoration: none }
    A:link { color: #0000ff }
    -->

    body
    a:link {
    color: #008040;
    text-decoration: none;
    }
    a:visited {
    color: #008040;
    text-decoration: none;
    }
    a:hover {
    color: #00009f;
    text-decoration: underline;
    }
    a:active {
    color: #008040;
    text-decoration: none;
    }
    </STYLE>
    </HEAD>
    <BODY LANG="en-US" TEXT="#ffffff" LINK="#0000ff" BGCOLOR="#7c683d" DIR="LTR">
    <TABLE WIDTH=1056 BORDER=0 CELLPADDING=2 CELLSPACING=0 STYLE="page-break-before: always">
    <COL WIDTH=350>
    <COL WIDTH=345>
    <COL WIDTH=350>
    <TR HEIGHT=250>
    <TD WIDTH=350></TD>
    <TD WIDTH=345></TD>
    <TD WIDTH=350></TD>
    </TR>
    <TR BGCOLOR="#7c683d">
    <TD COLSPAN=3 WIDTH=1052>
    <P><IMG SRC="images/banner.jpg" NAME="graphics1" ALIGN=LEFT WIDTH=1046 HEIGHT=254 BORDER=0><BR CLEAR=LEFT><BR>
    </P>
    </TD>
    </TR>
    <TR>
    <TD WIDTH=350></TD>
    <TD WIDTH=345>
    <P ALIGN=CENTER><A HREF="nysite.php" TARGET="content"><B><FONT COLOR="#ffffff">[Enter]</FONT></B></A></P>
    </TD>
    <TD WIDTH=350></TD>
    </TR>
    </TABLE>
    <P><BR><BR>
    </P>
    </BODY>
    </HTML>

  2. #2
    Join Date
    Apr 2005
    Location
    Bathurst, NSW, Australia
    Posts
    3,357
    I've never heard of the media @page...

    And if you are using CSS, why still have Font tags, and width, and height and clear, and bgcolor, and TABLES etc etc etc etc in your code?

    Have a look through this CSS tutorial.

  3. #3
    Join Date
    Sep 2005
    Posts
    597
    Quote Originally Posted by bathurst_guy
    I've never heard of the media @page
    I found it here:
    http://www.w3.org/TR/REC-CSS2/page.html#q1

    It is covered in CSS2 for paged media. Not sure if it is appropriate in this instance. It would depend on the usage of the site. Are you planning on making pages that will need predefined page breaks for printing onto slides?

    I would also read the tutorial suggested by bathhurst_guy to learn how to make your CSS external and maybe plan on getting rid of the tables in favor of just css/html.

    I think you're way ahead of the game just by declaring a doctype...most people don't even know what that is...including me until recently.

  4. #4
    Join Date
    Apr 2006
    Posts
    2
    Thanks for the tutorial link. I had found a couple CSS guides, but none of them very organised. This one looks better.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles