垂直对齐内容

时间:2016-07-07 17:17:53

标签: html css alignment

不确定如何提出这个问题。基本上,我正在尝试将YouTube视频添加到我的页面,并在其旁边添加一个元素,并对视频进行模糊处理。我要添加4个视频和4个总屏幕。当我使用添加下一个视频时,视频没有放在第一个视频下面。我去添加另一个属性,它不会出现。任何人都可以帮我弄清楚如何将视频垂直对齐,然后将元素放在每个视频旁边,同时将它们对齐在顶部?

我的HTML:

<div class="boonie">
</div>
<div class="blaze">
</div>

我的CSS:

.boonie {
position: absolute;
background-color:#FA8440;
right: 5px;
width: 600px;
height: 290px;
border: 6px solid #4d4d4d;
padding: 5px;
left: 440px;}

.blaze {
position: absolute;
background-color:#FA8440;
right: 5px;
width: 600px;
height: 290px;
border: 6px solid #4d4d4d;
padding: 5px;
left: 440px;}

2 个答案:

答案 0 :(得分:0)

为每个班级将职位从绝对更改为相对:

.boonie {
position: relative;
background-color:#FA8440;
right: 5px;
width: 600px;
height: 290px;
border: 6px solid #4d4d4d;
padding: 5px;
left: 440px;}

.blaze {
 position: relative;
background-color:#FA8440;
right: 5px;
width: 600px;
height: 290px;
border: 6px solid #4d4d4d;
padding: 5px;
left: 440px;}

Demo

答案 1 :(得分:0)

这是你想要实现的目标吗? (调整尺寸......)

let
    Source = Table.ExpandListColumn(Table.FromRecords({[Name= {"Bob", "Jim", "Paul"}, Discount = .15] }), "Name"),
    AddedErrClmn = Table.AddColumn(Source, "ErrClmn", each if [Name] = "Jim" then [Name]-[Discount] else [Discount]),
    AddedIndexClmn = Table.AddIndexColumn(AddedErrClmn, "Index", 1, 1),
    ErrorlessIndexes = Table.RemoveRowsWithErrors(AddedIndexClmn)[Index],
    AddedCheckClmn = Table.AddColumn(AddedIndexClmn, "Validation", each if List.Contains(ErrorlessIndexes, [Index]) then "ok" else "Error")
in
   AddedCheckClmn
private HashMap<String, HashMap<String, String>>  getNullableColumns(Connection dbConn, String resource) throws SQLException {

    HashMap<String, HashMap<String, String>>  nullableColumns = new HashMap<String, HashMap<String, String>>();
    HashMap<String, String> column = new HashMap<String, String>();
    DatabaseMetaData dm = dbConn.getMetaData();
    ResultSet rsColumns = dm.getColumns(null, null, getTable(resource), null);
    while( rsColumns.next( ) )
    {
        String type = rsColumns.getString("TYPE_NAME");
        String nullable1 = rsColumns.getString("NULLABLE");
        String nullable2 = rsColumns.getString("IS_NULLABLE");
        String dataType = rsColumns.getString("DATA_TYPE");
        String columnName = rsColumns.getString("COLUMN_NAME");

        column.put("type", type);
        column.put("nullable", nullable1);
        nullableColumns.put(columnName, column);

    }
    return nullableColumns;

}

相关问题