Width is not working

前端 未结 3 1195
攒了一身酷
攒了一身酷 2021-01-25 23:57

Sorry for this silly question, but i stick because of this problem, the width of the anchor tag is not working, basically i want to increase the height of the anchor tag so the

3条回答
  •  盖世英雄少女心
    2021-01-26 00:32

    Inline elements can't have altered width. You need to make that anchor a block, or inline-block, see here (gave it a green background so you can see how wide it is):

    .filteredRestBody {
        background: none repeat scroll 0 0 white;
        border: 1px dotted #5bc0de;
        border-top-left-radius: 23px;
        box-shadow: 0 0 0 grey;
        height: auto;
        padding: 0 0 47px 8px;
        position: relative;
        top: 30px;
        width: 115%;
    }
    
    .filterThumbnails {
        background-position: 2px -19px;
        background-repeat: repeat;
        border-top-left-radius: 10%;
        border-top-right-radius: 10%;
        height: 300px;
        margin-left: 4.3%;
        margin-top: 50px;
        width: 234px;
    }
    
    .restaurantThumbnailsTitle {
        background: none repeat scroll 0 0 rgba(0, 0, 0, 0.6);
        color: white;
        font-size: 1.6em;
        height: 95px;
        margin-left: -14px;
        position: relative;
        top: 44.7%;
        width: 114%;
      }
    
    .restaurantThumbnailsTitle a {
      display: block;
      background-color: green;
    }
    
    .restaurantThumbnailsTitle a:hover { 
      background-color: white;
    }
    Discount 15%
    Indian Chilly

    chilled out chinese

提交回复
热议问题