Align text with different divs on the same line [closed]

-2
Hello, I have a problem, I created a newsletter-only popup, but when I passed it to the html, with css, I had to use 2 different divs (I tried to use all the different ways, fonts, p, span) color and shadow of the text. I do not know if they will understand but I need to align 2 divs on the same line. Unintentionally, follow it as it is: nowfollowswhatitshouldlooklike:

I ask you to take into account only the title "Exclusive promotions direct in your email" the rest I will pass as soon as I solve this problem.

Thanks to all who have read and have a great day.

    
asked by anonymous 09.03.2016 / 16:44

3 answers

1

.text p{
  font-size 20px;
  color: #000;
}
.text p i{
  font-size: 30px;
  color: #ff0;
}
.text{
  float: left;
  width: 100%;
  }
<div class="text">
  <p>Promoções exclusivas direto no seu <i>email</i></p>
  </div>

Try to put something like this into the text, put it inside some tag and apply the css in the tag. It will work, work with the floats!

    
09.03.2016 / 17:32
1

Although you have already answered yourself, I think it is interesting to leave an answer for anyone who knows how to get you out of doubt, or to help you clarify.

Your problem was occurring because both elements were with the display: block property, and when you assume this property you can not align two elements side by side. So, you just have to set this property to display:inline-block that the problem would be solved.

Note: It's important to remember that there are elements that are already created with the display:block property and some not. The following are two links for you to take a look at ...

09.03.2016 / 17:44
-1

Whenever I ask a question here, the problem solves itself haha, good for those who have the same problem and I tried many forms in css and none worked, it is very unlikely that someone will be so " "as I forget to add a tag in the HTML itself giving conflict and bugging everything, I do not know if display: block does this, however it gave this problem and was only to remove that the problem was solved.

Thank you all!

    
09.03.2016 / 17:06