CSS problem
-
I am trying to learn CSS to format a page the desired way into WP, and in an example of CSS school I am not understanding an example. Below I added the * and changed the background of the whole page, but of the 3 things under h1, h2, p , the top one has no effect. So this won’t be green. It I move it below font size, then text will be green but font-size won’t change. If I move center above both then it won’t be centered. If I put something like color:red; above then the 3 below will all effect.
<!DOCTYPE html>
<html>
<head>
<style>
* {background-color:pink;
h1, h2, p
color:green;
font-size:160%;
text-align: center;
}
</style>
</head>
<body><h1>Hello World!</h1>
<h2>Smaller heading!</h2>
<p>This is a paragraph.</p></body>
</html>
- The topic ‘CSS problem’ is closed to new replies.