Click here to Skip to main content
15,887,338 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Well, I made up some code for making a website;

HTML
HTML
<div class="jumbotron-middle">
    <div class="container">
        <h1 class="h1-2" align="center">
            M<span class="letter2">A</span>KING<br>
            IMP<span class="letter2">O</span>SSIBLE<br>
            P<span class="letter2">O</span>SSIBLE.
        </h1>
        <hr>
    </div>
</div>


CSS
CSS
.jumbotron-middle {
    background-color: #fff;
    height: 700px;
}


Now the problem, it isn't responsive at all! if I make the page half or if I look it on my phone the text just cuts of....

Any tips?

What I have tried:

Not much because I'm new into coding.
Posted
Updated 21-Jun-16 5:48am
v2
Comments
Richard Deeming 21-Jun-16 10:09am    
You need to HTML-encode your code blocks, and wrap them in <pre>...</pre> tags.

I've fixed the formatting of your code blocks for you.

Use CSS media queries[^] to adjust the text size based on the width of the browser window.

You'll need to decide what size you want the text to be at the relevant breakpoints. For example:
CSS
.jumbotron-middle h1 {
  font-size: 1.2em;
}
@media (min-width: 480px) {
  .jumbotron-middle h1 {
    font-size: 2em;
  }
}
@media (min-width: 768px) {
  .jumbotron-middle h1 {
    font-size: 3em;
  }
}

Demo[^]
 
Share this answer
 
Change
<div class="jumbotron-middle">

to
<div class="jumbotron jumbotron-middle">

Make sure you set up your bootstrap correctly. Check this out: Bootstrapping Your Web Pages 1 – Getting Ready[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900