user3131148
user3131148

Reputation: 353

How to get margin between my videos?

I want to put some space between my videos which are in a inline-block I tried adding a margin-top but it doesn't seem to work? I also want to center my text on the right side of the video?enter image description here

 <div style="display: inline-block;">
   <div class="vidJava">
    <iframe style="clear:left; float: left" src="http://www.youtube.com/embed/videoseries?list=PLFE2CE09D83EE3E28"
            width="560px" height="315px" frameborder="0"></iframe>
       <p style="float: left;">lorem upsum unhgt nuhj ifn hh h</p>
    </div>

    <div class="vidJava" style="margin-top:50px;">
        <iframe style="clear:left; float: left" src="http://www.youtube.com/embed/videoseries?list=PLFE2CE09D83EE3E28"
                width="560px" height="315px" frameborder="0"></iframe>
        <p style="float: left;">lorem upsum unhgt nuhj ifn hh h</p>
    </div>
</div>

Upvotes: 0

Views: 77

Answers (4)

MickyScion
MickyScion

Reputation: 516

<div style="display: inline-block;">
<table>   
<tr>
<div class="vidJava">
    <iframe style="clear:left; float: left" src="http://www.youtube.com/embed/videoseries?list=PLFE2CE09D83EE3E28"
            width="560px" height="315px" frameborder="0"></iframe>
       <p style="float: left;">lorem upsum unhgt nuhj ifn hh h</p>
    </div>
</tr>
<tr>
(here you can add or leave it..depend on you)
</tr>
<tr>
    <div class="vidJava" style="margin-top:50px;">
        <iframe style="clear:left; float: left" src="http://www.youtube.com/embed/videoseries?list=PLFE2CE09D83EE3E28"
                width="560px" height="315px" frameborder="0"></iframe>
        <p style="float: left;">lorem upsum unhgt nuhj ifn hh h</p>
    </div>
</tr>
<table>
</div>

and there you have a division, it's better to order by tables if you want to have your page ordered, is my way of develop, i hope i helped you!

Upvotes: 1

guest112
guest112

Reputation: 1

Maybe try using a break in between the video divs. <br />

Upvotes: -1

Joe
Joe

Reputation: 519

Since your iframes are floated to the left, the divs wrapping them are probably collapsed.

Add this to your css

.vidJava
{
     overflow:auto;
}

Upvotes: 1

j08691
j08691

Reputation: 207900

Add overflow:auto to your .vidJava class.

jsFiddle example

Upvotes: 1

Related Questions