Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Centering Videos (HTML)

Featured Replies

The align attribute is deprecated.

Use CSS to align and position your elements.

 

BTW even if browsers would still interpret the align attribute your value "centre" is invalid.

The attribute can have the following values: left, right, middle, top or bottom

Edited by Nillervision

  • 2 months later...

You can try this one also.

HTML:

<div id="all">

<div class="sub">div</div>

<iframe>Video embedding code</iframe>

</div>

 

CSS:

#all

{

width:100%;

float:left;

text-align:center;

}

 

div.sub, iframe

{

width:100px;

height:50px;

margin:0 auto;

background-color:#777;
}

 

It works perfectly for me. Hope it will be helpful to you also.

 

You can try this one also.

[snipped copy-paste code]

 

It works perfectly for me. Hope it will be helpful to you also.

 

 

Should you want a couple of extra divs, some irrelevant floating, a video only 50px high ....

... it will be perfect.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.