How do I center a div on a fluid grid layout. The div is a video player restricted to 630px by 350 px?

I am building a fluid grid website and I have a web player in a <div> that is styled to be no larger than 630px by 350 px. I can't figure out how to get this div to stay center on the page no matter if it is mobile, tablet, or desktop. Can anyone shed some light on this?

Change display to block, apply the margain: auto.

Similar Messages

  • How to Scale Images in a Table in Fluid Grid Layout?

    I copied over a table full of mouseover images into my new fluid grid layout. It all works fine, but in Mobile mode, all the images are compressed horizontally. How do I fix this?
    http://savcp.com/howwemet-fluid.html

    Strip out your table code with F&R.  You could greatly reduce your code & page load by using CSS instead of image swap behaviors.  Same size images would produce a nicer appearance, too.
    Below, I used floated <p> tags as containers for pictures.  Copy & paste this into a new, blank document and SaveAs test.html.  Preview in browsers with various viewport widths to see the effect.
    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>HTML5 document</title>
    <style>
    body { background: #222 }
    /**BEGIN PICS**/
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    #pics {
    width: 100%;
    overflow:hidden;
    margin: 55px auto;
    border: 1px solid silver;
    #pics p {
    float: left;
    width: 24%;
    text-align: center;
    /**space between**/
    margin: 0 0.25%;
    border: 1px solid #222;
    #pics img {
    max-width: 100%;
    border: 5px solid #333;
    /**opacity on linked pics**/
    #pics a img {
    /**for pre-IE8**/
    filter: alpha(opacity=90);
    /**for other browsers**/
    opacity: .90;
    /**on mouseover**/
    #pics a img:hover, #pics a img:active, #pics a img:focus {
    filter: alpha(opacity=100);
    opacity: 1.0;
    border-color: #09C;
    /**ADJUST BREAKPOINTS AS REQUIRED**/
    /* Special Rules for Mobiles */
    @media only screen and (max-width: 480px) {
    #pics p{    height:110px;}
    /* Special Rules for Tablets */
    @media only screen and (min-width: 481px) {
    #pics p{    height:175px;}
    /* Special Rules for Desktops */
    @media only screen and (min-width: 600px) {
    #pics p{    height:255px;}
    /**end PICS**/
    </style>
    </head>
    <body>
    <div id="pics">
    <p><a href="howwemet/mb3.html">
    <img src="http://savcp.com/images/story/mb2.gif">
    </a></p>
    <p><a href="ww3.html">
    <img src="http://savcp.com/images/story/ww2.gif">
    </a></p>
    <p><a href="bs3.html">
    <img src="http://savcp.com/images/story/bs2.gif">
    </a></p>
    <p><a href="rr3.html">
    <img src="http://savcp.com/images/story/rr2.gif">
    </a></p>
    <p><a href="howwemet/mb3.html">
    <img src="http://savcp.com/images/story/mb2.gif">
    </a></p>
    <p><a href="ww3.html">
    <img src="http://savcp.com/images/story/ww2.gif">
    </a></p>
    <p><a href="bs3.html">
    <img src="http://savcp.com/images/story/bs2.gif">
    </a></p>
    <p><a href="rr3.html">
    <img src="http://savcp.com/images/story/rr2.gif">
    </a></p>
    <p><a href="howwemet/mb3.html">
    <img src="http://savcp.com/images/story/mb2.gif">
    </a></p>
    <p><a href="ww3.html">
    <img src="http://savcp.com/images/story/ww2.gif">
    </a></p>
    <p><a href="bs3.html">
    <img src="http://savcp.com/images/story/bs2.gif">
    </a></p>
    <p><a href="rr3.html">
    <img src="http://savcp.com/images/story/rr2.gif">
    </a></p>
    <p><a href="wk3.html">
    <img src="http://savcp.com/images/story/wk2.gif">
    </a></p>
    <p><a href="ss3.html">
    <img src="http://savcp.com/images/story/ss2.gif">
    </a></p>
    <!--end #pics-->
    </div>
    </body>
    </html>
    Nancy O.

  • How to Get SWF to be Responsive in Fluid Grid Layout?

    I inserted my swf in a fluid grid layout div tag so it would fit on any screen. But no matter which Scale setting I use for the swf (noborder, default, exactfit, noscale, or showall) nothing works.
    Take a look This one is exactfit. It scales but does not maintain the proper aspect ratio.
    http://savcp.com/index-fluid-05.html

    Line 177 & 189, change:
    <param name="scale" value="exactfit">
    to:
    <param name="scale" value="showAll">
    showAll will maintain proportions while fitting to 100% width & height - but beware your container holding the SWF will show the background color of SWF (black in your case) when you're sizing down. You could consider changing it to your site background (gray) to ensure it doesn't look odd.
    On a sidenote, why are you worried about putting a SWF file into a responsive design? It will not work on mobile devices anyway!

  • How to Get HTML5 Slideshow to Shrink in Fluid Grid Layout?

    I am able to insert images in a Fluid Grid Layour Div Tag and it shrinks according to the platform on which it is viewed.
    But I am trying to have the same result with a slideshow. I used CreateJS to convert the slideshow from Flash to HTML5.
    The problem is it won't shrink.
    Here is the URL.
    http://savcp.com/index-fluid-01.html

    Responsive Layouts require responsive slideshows. 
    Cycle2 is responsive.  Copy & Paste this into a New, Blank document.
    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>HTML5 with Cycle2</title>
    <!--helpf for older IE browsers-->
    <!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
    <!--Latest jQuery Core Library-->
    <script src="http://code.jquery.com/jquery-latest.min.js">
    </script>
    <!--Cycle2 Slideshow Plugin-->
    <script src="http://cdnjs.cloudflare.com/ajax/libs/jquery.cycle2/20130409/jquery.cycle2.min.js"></script>
    <style>
    /**Slideshow**/
    .cycle-slideshow {
    max-width:90%;
    margin: 0 auto;
    text-align: center;
    .cycle-slideshow img {max-width:100%}
    /* prev / next links */
    .cycle-prev, .cycle-next {
    position: absolute;
    top: 0;
    width: 30%;
    opacity: 0;
    filter: alpha(opacity=0);
    z-index: 800;
    height: 100%;
    cursor: pointer;
    .cycle-prev {
    left: 0;
    background: url(http://malsup.github.com/images/left.png) 50% 50% no-repeat;
    .cycle-next {
    right: 0;
    background: url(http://malsup.github.com/images/right.png) 50% 50% no-repeat;
    .cycle-prev:hover, .cycle-next:hover {
    opacity: .7;
    filter: alpha(opacity=70)
    /**END SLIDESHOW STYLES**/
    </style>
    </head>
    <body>
    <!--begin slideshow-->
    <div class="cycle-slideshow"
        data-cycle-fx=scrollHorz
        >
    <!-- prev/next links -->
    <div class="cycle-prev"></div>
    <div class="cycle-next"></div>
    <!--insert your images below-->
    <img src="http://jquery.malsup.com/cycle2/images/p1.jpg">
    <img src="http://jquery.malsup.com/cycle2/images/p2.jpg">
    <img src="http://jquery.malsup.com/cycle2/images/p3.jpg">
    <img src="http://jquery.malsup.com/cycle2/images/p4.jpg">
    <p>Mouse over image for previous / next links</p>
    </div><!--end slideshow-->
    </body>
    </html>
    Nancy O.

  • How to adjust height of header image in fluid grid layout

    I appreiate the help people are trying to give me but I need help on what "to" do not on what "not" to do. I'm tryinh to tweek the height of my header image in the indivisual device views without screwing each other up.Meaning when I adjust the height in smartphone view I dont want it to affect tablet view, or when I adjust the height in desktop view it doesn't affect smartphone view, and so on and so on. The width works fine (right now at least) because its simple 100% of screen so it scales great right now. Its the height I cant get!!! I cant adjust it. Each device needs a little tweek beause of design issues. PLease help
    ps no tutorial i've seen helps with the issues i'm going through, none. And I've had people offer suggestions so I done wasting days looking at these things. I just need the anwser a what to do.

    If you alter the height in the applicable css media query only that device will observe the specified height.
    What is it you are actually trying to do. Simple example below:
    <!DOCTYPE HTML>
    <html>
    <head>
    <meta charset="UTF-8">
    <title>Untitled Document</title>
    <style>
    #header {
        width: 100%;
        max-width: 980px;
        margin: 0 auto;
    img {
        max-width: 100%;
        height: auto;
    @media screen and (max-width: 480px) {
    .changeHeight {
    height: 500px;
    </style>
    </head>
    <body>
    <div id="header">
    <img src="yourImage.jpg" class="changeHeight"></div>
    </body>
    </html>
    If you want to target screens with a max-width of 480px you would write a css media query:
    @media screen and (max-width: 480px) {
    .changeHeight {
    height: 500px;
    However not sure why you would want to change heights as it will distort the image.
    You could server up an alternative sized image for desktop, tablet and smartpone:
    <!DOCTYPE HTML>
    <html>
    <head>
    <meta charset="UTF-8">
    <title>Untitled Document</title>
    <style>
    #header {
        width: 100%;
        max-width: 980px;
        margin: 0 auto;
    img {
        max-width: 100%;
        height: auto;
    .tablet {
    display: none;
    .smartPhone {
    display: none;
    @media screen and (max-width: 480px) {
    .deskTop {
    display: none;
    .tablet {
    display: none;
    .smartPhone {
    display: block;
    </style>
    </head>
    <body>
    <div id="header">
    <img src="deskTop.jpg" class="deskTop">
    <img src="tablet.jpg" class="tablet">
    <img src="smartPhone.jpg" class="smartPhone">
    </div>
    </body>
    </html>

  • Div options toolbar not displayed correctly in fluid grid layout

    When I select an inserted element in fluid grid layout, the options to hide, duplicate or delete the Div are not displayed. I only have the 'move up a row' arrow displayed. How do get the other options to display on the mini toolbar? My DW CS6 version is V12.0 Build 5861.

    It is called as the 'Smart HUD' and was made available in 12.2 CCM (Creative Cloud) update. Your version is 12.0 which looks like a regular non-cloud license.
    Are you actually a Creative Cloud subscriber? If not, you'll have to wait for a perpetual license upgrade in order to see/ use this feature.

  • How Do I Put Pictures anywhere in fluid grid layout??

    Hi,
    I was wondering how you put pictures anywhere you want in fluid grid layout without having to use the fluid grid layout div tag. I find it easier to use the ap div and simply insert pictures and move them freely however when i do that they dont stay in the correct place and the other grids? Is there an easier way?

    Sorry but APDiv tags don't work in Fluid Grid layouts.  That's why Adobe removed them from CC.
    You must use the Fluid Grid divs in your layout to hold your text and images.
    <div class="gridContainer clearfix">
         <div class="div1">
              insert image here...
         </div>
         <div class="div2">
              insert image here...
         </div>
    </div>
    Nancy O.

  • - How to vertically center a div?

    How to vertically center a div? :-S

    Cannot, really.
    Read this -
    http://www.apptools.com/examples/tableheight.php
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "Reese" <[email protected]> wrote in message
    news:eh34gg$rvh$[email protected]..
    > How to vertically center a div? :-S
    >

  • How To Center Fluid Grid Layout Div Tag

    Hello I am remaking my webiste and am new to fluid grid layouts. I am trying to center the images you will see in my website into the middle.
    I can use pixels to center it but it will not be centered for all screen resolutions. What do I have to change in the css rule defintion to center it all out or simply move it to the side?
    WEBISTE: http://auto-republic.com
    CODE: http://pastebin.com/LujvaGek
    Thanks in advance!

    In HTML Code View, line 53 - 56, replace what you have now with this:
    <div class="gridContainer clearfix">
         <div id="LayoutDiv1">
         <p>LAYOUTDIV1 CONTENT GOES HERE<p>
         <!--END LAYOUTDIV1--></div>
         <div id="LayoutDiv2">
         <p>LAYOUTDIV2 CONTENT GOES HERE</p>
         <a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('wrecker','','images/wreckerservice/wreckerservice2.gif',1)"><img id="wrecker" src="images/wreckerservice/wreckerservice2.gif"></a><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('facebook','','images/facebook/facebook2.gif',1)"><img id="facebook" src="http://auto-republic.com/images/facebook/facebook1.gif"></a><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('askaquestion','','images/askusaquestion/askaquestion2.gif',1)"><img id="askaquestion" src="http://auto-republic.com/images/askusaquestion/askaquestion1.gif"></a>
         <!--END LAYOUTDIV2</div>
    <!--END GRIDCONTAINER--></div>
    Nancy O.

  • How do I center an image inside a div tag using fluid grid layout?

    where do I find and what do i use the image properties position when using the fluid grid layout. I'd like to center the image in the mobile page versus th left position in the desktop.

    This is what my css codes looks like where the image is in the div tag:
    #logo_links {
        clear: both;
        float: left;
        margin-left: 0;
        width: 32.2033%;
        display: block;
    This is the html code where the image is:
      </div>
        <div id="logo_links">
          <div align="center">
            <p><img src="../fluidgrid/images/3_7x2logo.jpg" alt="" width="236" height="110" align="left"></p>
          </div>
        </div>
    I'm going to need more detail where to insert the suggested code as I am a newby!
    Thanks

  • How can i apply border for fluid grid layout div

    How can i apply border for fluid grid layout div

    <!doctype html>
    <!--[if lt IE 7]> <html class="ie6 oldie"> <![endif]-->
    <!--[if IE 7]>    <html class="ie7 oldie"> <![endif]-->
    <!--[if IE 8]>    <html class="ie8 oldie"> <![endif]-->
    <!--[if gt IE 8]><!-->
    <html class="">
    <!--<![endif]-->
    <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Untitled Document</title>
    <link href="boilerplate.css" rel="stylesheet" type="text/css">
    <link href="CSS/Layout.css" rel="stylesheet" type="text/css">
    <link rel="stylesheet" href="flexslider.css" type="text/css">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
    <script src="jquery.flexslider.js"></script>
    <!-- Place in the <head>, after the three links -->
    <script type="text/javascript" charset="utf-8">
      $(window).load(function() {
        $('.flexslider').flexslider();
    </script>
    <!--
    To learn more about the conditional comments around the html tags at the top of the file:
    paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/
    Do the following if you're using your customized build of modernizr (http://www.modernizr.com/):
    * insert the link to your js here
    * remove the link below to the html5shiv
    * add the "no-js" class to the html tags at the top
    * you can also remove the link to respond.min.js if you included the MQ Polyfill in your modernizr build
    -->
    <!--[if lt IE 9]>
    <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <script src="respond.min.js"></script>
    </head>
    <body>
    <div class="gridContainer clearfix">
      <div id="LayoutDiv1"><img src="SJV-Images/Banners/Dark-green-curved-header.png"/></div>
      <div id="LayoutDiv2">
      <div class="flex-container">
      <div class="flexslider">
        <ul class="slides">
          <li>
            <img src="SJV-Images/Stud1.jpg"/>
          </li>
          <li>
            <img src="SJV-Images/Stud2.jpg" />
          </li>
          <li>
            <img src="SJV-Images/Stud3.jpg" />
          </li>
        </ul>
      </div>
    </div> </div>
      <div id="Nav">This is the content for Layout Div Tag "Nav"</div>
      <div id="Special_Features"><h3 align="center">SPECIAL FEATURES</h3>
      <ul>
      <li>
      It is one of the oldest school.</li>
      <li>It was first started as an orphanage for the children of British soldiers, and later moved to its current location.</li>
       <li>Rich in Anglo-Indian tradition dating back to three centuries.</li>
      <li>The campus now has separate buildings within the campus for year 1 to  year 8 (Junior and Sub Junior block) and year 9 to year 12 (Senior and   Super Senior block).</li>
      <li>The school has montessori facilities in a separate building.</li>
      <li>The School also has boarding facilities for students from distant places.</li>
      </ul></div>
      <div id="History"><img src="SJV-Images/His_Image.png" alt="Hisimage" class="floatleft">
      <h3>HISTORY OF OUR SCHOOL</h3><P>In 1750 – a very long time ago,a missionary and a teacher, Christian Frederick Schwartz came to India to work in the Danish Mission at Tranquebar.Due to his own personal charm, genius and integrity, soon he became a trusted envoy to the court of Princes ,both hostile and friendly. He even helped in the training and education of Serfogee Rajah, the adopted son of the Tanjore Raja Tuljagee.</P></div>
    <div id="Photo_Gall"><center>
        <strong>PHOTO GALLERY</strong>
    </center>
      <p><img src="SJV-Images/Photogall.png" width="174" height="70" class="floatright"/></p>
    </div>
      <div id="News_Events"><center>
        <strong>NEWS & EVENTS</strong>
      </center><center>Annual Day<br><center>
        Alumni Meet<br>
        Exam Time Table<br>Parents-Teacher's Meet</center>
      </center>
      <br></div>
      <div id="footer">This is the content for Layout Div Tag "footer"</div>
    </div>
    </body>
    </html>

  • How to setup a default direction for new divs in fluid grid layout in dreamweaver?

    Hi,
    how to setup a default direction for new divs in fluid grid layout in dreamweaver? I am an RTL interface user, I need my new divs to be inserted from right to left not Left to Right! could it be in dreamweaver?
    Thanks.

    This may get me into strife, but my experience is that you are better off finding another platform for your RWD.
    The framework that I tend to use is by Zub-Foundation http://foundation.zurb.com/.
    A commercial product that I have come to appreciate can be found here http://www.projectseven.com/products/tools/composer/index.htm. Please do not mention me if you happen to choose this product.

  • How to setup a default size for new divs in fluid grid layout in dreamweaver?

    Hi,
    how to setup a default size for a new divs in fluid grid layout in dreamweaver? I don't need the default size for new divs as a 100% width, I need them 13.69% as a one coulmn width only (7 coulmns fluid grids layout for desktop size 1000w).
    This problem I've faced when I intended to insert dozens of fluid grid divs in the layout.

    Sorry, I don't believe that you have had a good look at the Foundation framework. I'll now hold your hand while we go through the basics.
    Here is the specific page http://foundation.zurb.com/docs/components/grid.html
    The default values are
    Em-base : 16px
    Row width: 62.5em (62.5em x 16px = 1000px)
    Columns per row: 12
    These and other default values can be changed. The fact of the matter is that if you stipulate a section width of 2 or 3 or 12 columns, the widths will automatically be calculated for you.
    In your case, if you want 7 columns, all you need to do is change the number of columns per row and the rest is done for you.

  • In Fluid Grid layout, I have hidden 2 div for mobile layout. How do I unhide them?

    In Fluid Grid layout, I have hidden 2 <div> for mobile layout. How do I unhide them?

    Hi there,
    I visited your site using Dreamweaver CC and tested it using the default Desktop, Tablet and Mobile sizes, followed by the Smart Phone Size.
    The CSS you currently have sets the featurest <div> to 'display: none' when viewed on screen sizes lower than 480px:
    Another helpful way to find out what is going on with your CSS is to test the site with Firefox using Web Developer Tools to inspect the element (or alternatively, Adobes Inspect tool). You can right-click the image and "Inspect Element" then resize the browser window so you can see exactly which CSS rule is being applied and overrided.
    My suggestion would be to add an additional media query in Dreamweaver to handle all screen sizes below 480px and then set divs or elements you want to hide or show display property to visible.
    Hope this helps!

  • DW CC Fluid grid layout how to change px width for desktop layout

    Hi there,
    I have been going through the various tutorials about fluid grid layout and setting up our bureau's website in a responsive layout.
    The width of the original design was 960 px and the hero pic and others have been exported at that size.
    The first divs in the design look fine, header with the 960 px pic in it, and also the BC menu which is set to 960 wide.
    However the body text goes out to the right, past the 960 px and this is because, right at the start, when starting the file in DW the desktop screen width is set to 1232px.
    How can you change this setting when starting a new fluid grid layout?
    I have tried changing the number of columns, or the percentage, and the width for desktop remains at 1232px.
    Why is this?
    Not all of our clients want a site 1232px wide on a pc.
    Thanks so much.

    Hi Ben and Nancy,
    Thanks for your replies, but maybe you both don't realise I am asking specifically about DW CC and setting up a responsive design using a fluid grid layout?
    I have been following the recent videos from Adobe on this.
    As far as the width of 960 goes, Nancy I am only shortchanging myself, as this is the website for our agency. The original design is 960px wide as I did read somewhere that this width is recommended now that responsive is coming, as it is easily divided into a grid layout. I also am quoting for a client at the moment who wants a responsive design for their website, and they have specifically requested that the site have a maximum width of 960 px. So I would like to find out if this is possible in DW CC at the moment when doing a fluid grid layout.
    So what I am trying to do here is follow the Adobe tutorials on responsive design, using DW CC and I am using the current design for our agency website as a trial to set this up and try and get it working as a responsive website.
    It does not seem to me that many other people are doing this, as most people are recommending that I try Github or Bootstrap.
    However, I am not a coder and I am used to using DW, so I would like to get the DW CC responsive design features working if possible.
    Ben the CSS you are looking at is being generated by DW CC as I follow the steps in the Adobe demonstration videos to set up a fluid grid layout in DW CC.
    One of the things they say in the videos is that you can't program the CSS directly when doing a fluid grid layout, or you break the CSS and it all stops working. So I am using the new panels in DW CC to set up the layout. One thing I cannot get access to is the ability to set a maximum width for the site. It seems to be set in concrete when you start the fluid design up in DW CC.
    Here is a pic of the screen I am talking about that sets the maximum width:
    I cannot click in the pixel width at the top and change it. Also if I adjust the number of gridlines or the percentage for the pc layout, the default maximum pixel width does not change.
    If you click on the preferences button and go into the Window sizes screen, there does not seem to be a way to set the maximum pc width here either, so I am a bit stumped.
    Maybe I just have say to my clients that if you want a responsive design then the max width for pc can only be 1232px? It does seem strange to me that this cannot be changed.

Maybe you are looking for

  • On OS X Lion how do I fix headphones

    When I plug them in I lose all sound and it stays gone until I reboot, even if I unplug them. How do I fix this? It worked until I upgraded to Lion.

  • Problem with Polling interval at sender side in JDBC adapter

    Hello, I have some problem in investigating one serious issue using this polling interval, I am using the sender JDBC adapter where i used polling interval as 60(in secs) and 1(in Msecs). So it comes upto 60.001 secs of polling interval. There are ne

  • 2nd try - DPS 7 dpadm add-virtual-transformation not working as expected

    I use DPS 7.0 B2009.1104.2146 on RHEL 4 update 8. (32 bits) I have an LDAP back-end where X509 user certificates are stored in either the usercertificate;binary attribute or the certAuth;binary attribute. I want my DPS to authenticate users thanks to

  • How can I  extract non-cumulative cube data to another cubes ?

    Dear Expert,          I copied inventory cube 0ic_c03 to  a new cube : ZIC_C03  , then I loaded the data of 0ic_c03 to the new cube ZIC_C03 .  the loading was sucessful, but  the result of  report of the ZIC_C03 was not correct. After looking into th

  • Data Upload for Transaction KE51 through LSMW/BDC

    Dear All, I have a requirement where in i have to upload the customized data for Transaction KE51 and KS01 using LSMW or BDC or BAPI. Please let me know the best possible procedure to achieve this task and how to do it. What are the validation we nee