/    Sign up×
Community /Pin to ProfileBookmark

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>

to post a comment
HTML

3 Comments(s)

Copy linkTweet thisAlerts:
@bathurst_guyApr 02.2006 — 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 [url=http://www.w3schools.com/css/default.asp]this CSS tutorial[/url].
Copy linkTweet thisAlerts:
@KeveyApr 02.2006 — I've never heard of the media @page[/QUOTE]

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.
Copy linkTweet thisAlerts:
@allelopathauthorApr 02.2006 — Thanks for the tutorial link. I had found a couple CSS guides, but none of them very organised. This one looks better.
×

Success!

Help @allelopath spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.25,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...