As the title said how can I align a paragraph and its header.
Here is an example.
my code
Here is what I wanna achieve.
As the title said how can I align a paragraph and its header.
Here is an example.
my code
Here is what I wanna achieve.
for the width i would either make your width 100% or add the bootstrap class "container-fluid’, you would do this in the css as body{width:100%;} or . not sure what or where you wanted to align too but you could use a simple style in your css of text-align: and then what ever direction you wanted, im guessing center. body{ text-align: center;} or h1{ text-align:center;} p{text-align: center;} Good luck and keep up the hard work. Youre at a very fun time where you are just starting to create real tangible sites. The World Is Yours
What I wanted to do was to make the header and the <p>
elements have the same width.
Like in this pic, I want both of them start and end at those red lines.
in .section change margin to "0 auto"
and delete max-width from .section_content and add it to .section
Oh, wow. It was that easy.
Thanks!!!
add the background-color to the body element.
I just want the background color to show on a part of the website…
Just like this one: http://www.n3rdfusionstudios.com/
<header>
<p class="section_header">We are the world's most influential video game broadcasting<br>company</p>
</header>
header {
background-color: #eee;
}
.section_header{
max-width: 500px;
margin: auto 0;
}
delete max-width from .section
this is a example for header, if you want it for contents too you must
put them in a parent div and add the max-width to the contents, and background-color
to the the parent, for centering use margin: 0 auto;
I did it! I included the whole section into a div.
Then give the div a background color, then I set a max-width into section.
Thanks!!!
I will post a link here once I finish the whole cloning project.