Home > Blockchain >  Background of Text with spacing
Background of Text with spacing

Time:04-20

please have a look at the attached picture... For a wordpress site I need to enter a custom CSS. I have a slogan or company name which needs to have a background color. But when the site is responsive and the text is splitted into another row, I need a space.

But when I search through google I only get results for changing the complete background of the text field.

.ueberschrift {
     background-color: #FF00E9;
     padding: 8px;
}

Can somebody help me?

Regards Markus

My results...

CodePudding user response:

try changing the css code to:

.ueberschrift p {
     background-color: #FF00E9;
     padding: 8px;
}

i added a "p" after ".ueberschrift" class which should only select the text.

CodePudding user response:

If I understand you need a margint(white space) between Schwere and disthymische....... To achive this you must think first of all to put the all sentence in 2 containters. for example:

HTML:

<div >
 <span>Schwere</span>
 <span>disthymische.......</span>
</div>

CSS:

.ueberschrift span {
 background-color: #FF00E9;
 padding: 8px;
 margin-bottom: 8px;
}

In this way you will set a margin bottom between 2 spans, when you at a small resolution.

  • Related