weex icon indicating copy to clipboard operation
weex copied to clipboard

cell not support margin-right?!

Open Rowandjj opened this issue 10 years ago • 3 comments

list-item.we

<template>

    <div class="container">
      <text class="title">hello world</text>
    </div>

</template>

<style>
  .container{
      background-color: #000000;
      width:750;
      height:120;
      margin-top:10;
      margin-right:10;
      margin-left:5;
  }
  .title{
    color:#ffffff;
  }

</style>

list.we

<list>
  <cell>
          <list-item></list-item>
      </cell>
    </list>

marin-top & margin-left works,margin-right no effect at all.

is there sth wrong?

Rowandjj avatar Jun 15 '16 02:06 Rowandjj

@cxfeng1

jinyue-rdj avatar Jun 15 '16 02:06 jinyue-rdj

@Rowandjj It seems like width:750px written in style leads to the problem. The layout respects width more than margin-right, which behaves the same way as Web.

So maybe you can just delete the width style and reach your destination.

cxfeng1-zz avatar Jun 15 '16 03:06 cxfeng1-zz

@cxfeng1 soga,thank you very much~

Rowandjj avatar Jun 15 '16 04:06 Rowandjj