PDA

View Full Version : Help with formatting text in CSS



404dev
Apr 26th, 2017, 09:32 AM
I am very bad at html and css but for my online resume I am investing a lot of time into it so I can have a good looking site. My question is this I have a static website with the first section having an ID of banner so to edit font size of <p> and <h1> all I would do is #banner .content header p { then I would add font size and other editing factors. I had started my second section called one, i went to do the same thing #one .content header p { I then tried color and font size but the text was not changing at all. Any ideas my code is bellow. VIA pastbin: https://pastebin.com/3bMsRyTK

sunfighter
Apr 26th, 2017, 11:31 PM
You have no ID of banner in the code you show. Look at this:


<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="utf-8">
<title>Jimmy Dean</title>
<style type="text/css">
header h1{
color: Green;
}
header p{
color: blue;
}
</style>
</head>

<body>
<header>
<h1>My Site</h1>
<p>A great place to test things out</p>
</header>
</body>
</html>