?
Solved

Can't get CSS Side by Side divs to work with youtube

Posted on 2013-05-15
5
Medium Priority
?
527 Views
Last Modified: 2013-05-15
I have been trying to get css to get 2 divs to show side by side.  While float: left appears to work on most things, it doesn't appear to work with Youtube's Html 5 player.

Link to the actual page.

NOTE: the page dynamically updates based on the video time, so you don't see any side values until about 8 seconds into the video.

Here is the CSS:
div#player {
    width: 640px;
    height: 480px;
    float: left;
    text-align: left;
}
div#content {
    width: 200px;
    float: right;
    text-align: left;
}
.clear { 
    clear: both;
}

Open in new window


Here is the HTML:  (populated by javascript)
<div id="player"></div>
<div id="content"></div>
<div class="clear"></div>

Open in new window


What it looks like and how I want it.
Any ideas?
0
Comment
Question by:hpdvs2
  • 3
  • 2
5 Comments
 
LVL 6

Expert Comment

by:APoPhySpt
ID: 39168177
I'm using firefox latest version, and it displays fine...
but I've seen this kind of issue before, perhaps you are trying to insert 2 divs side by side and there is not enough space for it on the parent container
0
 
LVL 8

Author Comment

by:hpdvs2
ID: 39168225
plenty of space.  Padding/margin/widths are all measured.  there is an extra 20 px to spare.

Any ideas why it might not work in chrome?  or is it just my copy?
0
 
LVL 6

Expert Comment

by:APoPhySpt
ID: 39168242
let me try on chrome
0
 
LVL 6

Accepted Solution

by:
APoPhySpt earned 2000 total points
ID: 39168266
try it like this:

<div class="playerContent">
      <div id="player"></div>
</div>
<div id="content"></div>
<div class="clear"></div>

Open in new window


CSS:

.playerContent {
 float: left;
 width: 645px;
 height: 485px;
}

div#player {
    width: 640px;
    height: 480px;   
    text-align: left;
}
div#content {
    width: 200px;
    float: right;
    text-align: left;
}
.clear { 
    clear: both;
}

Open in new window

0
 
LVL 8

Author Closing Comment

by:hpdvs2
ID: 39168347
Worked as well as a TD, and it wasn't a TD!  :D
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question