WordPressサイトのページテンプレートを作成しています。
newpagetemplate.phpファイルには、現在このコードがあり、このコードは次のとおりです。
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Copywriting for Serious Marketers</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="copywriting, sales writing, marketing" />
<meta name="copyright" content="Copyright Richard Clunan. All rights reserved." />
<meta name="description" content="Advice on copywriting and marketing." />
<meta name="revisit-after" content="7 days" />
<?php
/*
Template Name: Salespage
*/
?>
<div>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php the_title(); ?>
<?php the_content(); ?>
<?php endwhile; endif; ?>
</div>
</head>
<body>
<body topmargin="100">
<body leftmargin="300">
<body rightmargin="300">
<body bottommargin="10">
</body>
</html>
私の理解が正しければ、マージンを設定するために使用した値はhtmlコードです。
そして、私の理解が正しければ、代わりに使用できるCSSコードがあります。これ、私は思う:
body {
margin-top: 100px;
margin-right: 300px;
margin-bottom: 10px;
margin-left: 300px;
}
これらのコードの抜粋を切り替えるだけでは、新しいバージョンではマージンが適用されません。
CSSコードを機能させるには何をする必要がありますか?
また、1つまたは他のタイプのコードは、さまざまなブラウザーでの表示など、さまざまな状況で問題が少なくなる可能性がありますか?