- This topic is empty.
-
AuthorPosts
-
August 28, 2019 at 7:31 am #295075
dustnik
ParticipantI’ve posted this twice, but it doesn’t seem to be showing up. Let’s hope this time works. I have two questions.
1.) I tried to add a 2px padding inside all four sides of my document using the following code, but it only worked on the top and bottom. What am I doing wrong?
.background {
background-color: oldlace;
padding: 2px;
}2.) I made the first character in every chapter a raised initial, but the next line of text is slightly lower than it should be. I don’t understand why, as it doesn’t drop down.
.cap {
color: crimson;
font-family: Georgia, serif;
font-style: italic;
font-size: 2.5em;
}Can anyone out there help this poor newbie?
August 28, 2019 at 7:35 am #295076Paulie_D
MemberA demo of the issues in Codepen.io would be very helpful rather than a couple of bits of isolated CSS.
August 28, 2019 at 7:38 am #295077dustnik
ParticipantI don’t understand what you’re asking me for. Remember, I’m new to this.
August 28, 2019 at 8:24 am #295094Paulie_D
MemberWe can’ diagnose a problem we can’t see.
Go to Codepen.io, add the minimum HTML & CSS to demonstrate the problem and post a link to the demo.
August 28, 2019 at 8:53 am #295100dustnik
ParticipantI tried doing as you asked and saved both the html and the CSS, but I don’t know how to link to it. Will it help if I give you the URL to the actual page, and you can see what I’m talking about? I’d like the text to have a little padding on the sides. The initial is about halfway down the page. You can see the extra space beneath it.
August 28, 2019 at 3:32 pm #295114uxfed
ParticipantYeah that’s fine dustnik.
-
I’m not actually seeing a problem. It’s a lot more noticeable if you bump up the amount of padding there but it’s applying all around the background element.
-
I’d suggest using the style
line-height: 1;
on the style#workskin .cap
August 28, 2019 at 4:15 pm #295116dustnik
ParticipantThank you! Thank you! Thank you! The line-height thing fixed the problem. I knew it would probably be something simple, but I didn’t have a clue what that might be.
Both on my laptop and cell phone, the text goes all the way to the edges, although there is room on the top and bottom of the colored background. It makes the whole thing look ”cut-off” somehow. It would read so much nicer if there was a little space on the sides between the text and the edge of the body color. There is a margin surrounding the outside of the body, but I don’t think I can change that part. -
-
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.