2
I’m trying to align the div and text side by side, but it doesn’t work at all, I’ve tried float, tb, align and nothing works someone please can give me a help.
#sobre {
width: 100%;
height: 100%;
background-color: #0C0;
background-size: cover;
}
.foto {
width: 500px;
height: 550px;
margin-left: 100px;
margin-top: 150px;
}
p.title {
float: left;
font-family: "Times New Roman", Times, serif;
margin-top: 50px;
margin-right: 225px;
font-size: 80px;
color: #FFF;
}
.infos {
width: 400px;
font-family: Arial;
Helvetica,
sans-serif;
font-size: 16px;
margin-top: 200px;
background-color: #3CO;
color: #FFF;
}
<div id="sobre">
<p class="title">
Sobre Mim:
</p>
<p class="infos">
Etiam posuere quam ac quam. Maecenas aliquet accumsan leo. Nullam dapibus fermentum ipsum. Etiam quis quam. Integer lacinia. Nulla est. Nulla turpis magna, cursus sit amet, suscipit a, interdum id, felis. Integer vulputate sem a nibh rutrum consequat.
Maecenas lorem. Pellentesque pretium lectus id turpis. Etiam sapien elit, consequat eget, tristique non, venenatis quis, ante. Fusce wisi. Phasellus faucibus molestie nisl. Fusce eget urna. Curabitur vitae diam non enim vestibulum interdum. Nulla
</p>
</div>
jsFiddle: https://jsfiddle.net/u7sa5sdc/4/
"the div and the text side by side" - what do you mean? the text is inside the div... you mean the
.title
and the.infos
side by side?– Sergio
Exactly, I would like . Tittle and . Infos to stand side by side.
– R. Ribeiro
display: inline;
– M8n
@R.Ribeiro Thus? -> https://jsfiddle.net/u7sa5sdc/5/
– Sergio
http://www.w3schools.com/css/css_display_visibility.asp
– M8n