1 reply [Last post]
Zaaz
Zaaz's picture
Offline
newbie
Last seen: 14 weeks 2 days ago
Timezone: GMT+3
Joined: 2020-04-27
Posts: 1
Points: 2

Hi everyone!
This is my html and css codeĐ–

<header>
     <p>Hi there! We are the new kids on the block
                    and we build awesome websites and mobile apps.</p>
</header>

header {
  background-color: #87509c;
  font-family: sans-serif;
  color: #ffffff;
}
    p {
  padding: 147px 97px 67px 97px;
  font-weight: bold;
  font-size: 2.63em;
  text-align: center;
  color: #f7f3ea;

Please tell me how can I set equal padding for first line in text?

Mod edit: Added code mark up to html section. ~gt

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 14 hours 46 min ago
Dallas
Timezone: GMT-5
Joined: 2004-06-25
Posts: 9761
Points: 3843

Padding

Padding is apparently not an allowed property of ::first-line. Neither is margin.

See the official documentation at https://developer.mozilla.org/en-US/docs/Web/CSS/::first-line

Why are you using px measures rather than ems? Also why padding instead of margin?

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.