Padding problem |
Padding problem |
msucimaster |
May 5 2020, 12:56 PM
Post
#1
|
Newbie Group: Members Posts: 11 Joined: 29-April 20 Member No.: 27,307 |
Thanks for solving my last problem. I have a new issue that puzzles me.
Inside a div I want to have a colored bar over the full width. Inside this bar I have some text. That text should be to the left with some margin. It is that margin that gives me a problem. I try to assign it with padding-left. It works for the text. Unfortunately a side effect is that bar grows with the size of the padding and now goes over the boundary of the enclosing div. What am I doing wrong? The code I have is: <div class="subBar">My Text</div> div.subBar { width: 100%; height: 28px; margin-top: 20px; font-size: 20px; text-align: left; padding-left:120px; background: #ee7; } |
deb1 |
May 10 2020, 04:37 AM
Post
#2
|
Advanced Member Group: Members Posts: 109 Joined: 7-May 20 Member No.: 27,330 |
i didn't understand the errors . Can you please explain it to me
|
pandy |
May 10 2020, 07:02 AM
Post
#3
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,732 Joined: 9-August 06 Member No.: 6 |
I thought I already did above. What don't you understand specifically?
|
Lo-Fi Version | Time is now: 26th April 2024 - 11:23 PM |