Content goes out of a background

2909 views html
-4

I have a section which contain a content and I have added a background to it , I want content to be inside the background, unfortunately am not be able to get what I want.

Here is visual of what is expectedenter image description here

Here is what I have done so far : http://jsfiddle.net/Mwanitete/8w36hrdk/

Here is HTML

<div class="marketing-main-page-content-FAQ">
            <div class="marketing-main-page-content-FAQ_header">
                <h5>Faq</h5>
                <p>Lorem ipsum dolor sit amet, vidit mundi gubergren ne usu, porro evertitur vix et.
.</p>
            </div>
            <div class="marketing-main-page-content-FAQ_pytanie">
                <div class="marketing-main-page-content-FAQ_pytanie-card card-0 card">

                    <a class="pytania" data-toggle="collapse" href="#test-block0" aria-expanded="true" aria-controls="test-block0">
                        Demo1
                    </a>
                    <div id="test-block0" class="collapse">
                        <div class="card-block">
                            Po klikni?ciu w pytanie rozwija si? dropdown z odpowiedzi? na pytanie, jak klikniemy na
                            inne to si? zwija. Najlepiej, ?eby by?y to max. 2 zdania.
                        </div>
                    </div>
                </div>

                <div class="marketing-main-page-content-FAQ_pytanie-card card-0 card">
                    <a class="pytania" data-toggle="collapse" href="#test-block1" aria-expanded="true" aria-controls="test-block2">
                         Demo1
                    </a>
                    <div id="test-block1" class="collapse">
                        <div class="card-block">
                            Po klikni?ciu w pytanie rozwija si? dropdown z odpowiedzi? na pytanie, jak klikniemy na
                            inne to si? zwija. Najlepiej, ?eby by?y to max. 2 zdania.
                        </div>
                    </div>
                </div>
                <div class="marketing-main-page-content-FAQ_pytanie-card card-0 card">
                    <a class="pytania" data-toggle="collapse" href="#test-block2" aria-expanded="true" aria-controls="test-block">
                       Demo1
                    </a>
                    <div id="test-block2" class="collapse">
                        <div class="card-block">
                            Po klikni?ciu w pytanie rozwija si? dropdown z odpowiedzi? na pytanie, jak klikniemy na
                            inne to si? zwija. Najlepiej, ?eby by?y to max. 2 zdania.
                        </div>
                    </div>
                </div>
                <div class="marketing-main-page-content-FAQ_pytanie-card card-0 card">
                    <a class="pytania" data-toggle="collapse" href="#test-block3" aria-expanded="true" aria-controls="test-block">
                      Demo1
                    </a>
                    <div id="test-block3" class="collapse">
                        <div class="card-block">
                            Po klikni?ciu w pytanie rozwija si? dropdown z odpowiedzi? na pytanie, jak klikniemy na
                            inne to si? zwija. Najlepiej, ?eby by?y to max. 2 zdania.
                        </div>
                    </div>
                </div>
                <div class="marketing-main-page-content-FAQ_pytanie-card card-0 card">
                    <a class="pytania" data-toggle="collapse" href="#test-block4" aria-expanded="true" aria-controls="test-block">
                        Demo1
                    </a>
                    <div id="test-block4" class="collapse">
                        <div class="card-block">
                            Po klikni?ciu w pytanie rozwija si? dropdown z odpowiedzi? na pytanie, jak klikniemy na
                            inne to si? zwija. Najlepiej, ?eby by?y to max. 2 zdania.
                        </div>
                    </div>
                </div>
                <div class="marketing-main-page-content-FAQ_pytanie-card card-0 card">
                    <a class="pytania" data-toggle="collapse" href="#test-block5" aria-expanded="true" aria-controls="test-block">
                       Demo1
                    </a>
                    <div id="test-block5" class="collapse">
                        <div class="card-block">
                            Po klikni?ciu w pytanie rozwija si? dr

answered question

1 Answer

10

I normally use percents or ems rather than pixels, makes life easier

Also try adding the below in your css file

body, html {
height:100%;
width : 100%;
max-height:100%;
max-width : 100%;
}

posted this

Have an answer?

JD

Please login first before posting an answer.