0

I have the following code:

<div class="outsideDiv">
    <div class="element1">Name: </div>
    <div class="element2">Something</div>
    <div class="element3"> - </div>
    <div class="element4">This something is great</div>
</div>

The outer div is display:block and all of the inside divs are display:inline. In the browser it all shows up on the same line like this:

Name: Something - This something is great

When I go to print it, the 4 divs show up on seperate lines like this:

Name: 
Something
-
This something is great

I am having a hard time figuring out how to get the 4 inside divs to print on the same line.

quasidon
  • 1
  • 1

1 Answers1

0
<div class="outsideDiv">
    <div class="element1" style="display:inline">Name: </div>
    <div class="element2" style="display:inline">Something</div>
    <div class="element3" style="display:inline"> - </div>
    <div class="element4" style="display:inline">This something is great</div>
</div>

or

write this to your print.css:

.element1,.element2, .element3, .element4 {display: inline;}
WaPaRtY
  • 500
  • 3
  • 5