logo
Tags down

shadow

Set width equal to hight


By : Denis Karlov
Date : August 02 2020, 12:00 AM
should help you out You can add a width to your hover. I think your issue is your container is bigger than the actual view box, so 50% is larger than you think.
code :
* {
  margin: 0;
}

body {
  background-color: #171717;
}

.box {
  margin: 5px;
  display: inline-block;
  width: 300px;
  height: 200px;
  overflow: hidden;
  border-radius: 5px;
  cursor: pointer;
}

.box .headline {
  position: relative;
  width: 100%;
  height: 100%;
  transition: 0.5s;
  -webkit-transition: 0.5s;
}

.box .headline .img-container {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.2);
  transition: 0.5s;
  -webkit-transition: 0.5s;
}

.box .headline .img-container img {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  height: 80%;
  padding: 10%;
  transition: 0.5s;
  -webkit-transition: 0.5s;
}

.box:hover .headline {
  height: 33%;
 }
 
.box:hover .headline .img-container {
  position: relative;
  background-color: rgba(0, 0, 0, 0.2);
  height: 100%;
  width: 22.5%;
 border-radius: 50%;
}

 
 .box:hover .headline .img-container img {
  height: 70%;
  border-radius: 50%;
}
 
 .box .content {
   opacity: 0;
   padding: 5px;
   max-height: calc(66% - 10px);
   overflow: hidden;
   transition: 0.5s;
  -webkit-transition: 0.5s;
 }
 
.box:hover .content {
    opacity: 1;
  }
<div class="box" style="background-color: rgb(255, 131, 96);">
  <div class="headline">
    <div class="img-container">
      <img src="https://image.flaticon.com/icons/svg/1041/1041820.svg">
    </div>
  </div>
  <div class="content">
    Lorem ipsum<br />
    Lorem ipsum<br />
    Lorem ipsum<br />
    Lorem ipsum<br />
    Lorem ipsum<br />
    Lorem ipsum<br />
    Lorem ipsum<br />
    Lorem ipsum<br />
  </div>
</div>

<div class="box" style="background-color: rgb(125, 206, 130)">
  <div class="headline">
    <div class="img-container">
      <img src="https://image.flaticon.com/icons/svg/1041/1041820.svg">
    </div>
   </div>
  <div class="content">
    Lorem ipsum<br />
    Lorem ipsum<br />
    Lorem ipsum<br />
    Lorem ipsum<br />
    Lorem ipsum<br />
    Lorem ipsum<br />
    Lorem ipsum<br />
    Lorem ipsum<br />
  </div>
</div>

<div class="box" style="background-color: rgb(232, 226, 136)">
  <div class="headline">
        <div class="img-container">
      <img src="https://image.flaticon.com/icons/svg/1041/1041820.svg">
    </div>
  </div>
  <div class="content">
    Lorem ipsum<br />
    Lorem ipsum<br />
    Lorem ipsum<br />
    Lorem ipsum<br />
    Lorem ipsum<br />
    Lorem ipsum<br />
    Lorem ipsum<br />
    Lorem ipsum<br />
  </div>
</div>

<div class="box" style="background-color: rgb(0,255,245)">
  <div class="headline">
        <div class="img-container">
      <img src="https://image.flaticon.com/icons/svg/1041/1041820.svg">
    </div>
  </div>
  <div class="content">
    Lorem ipsum<br />
    Lorem ipsum<br />
    Lorem ipsum<br />
    Lorem ipsum<br />
    Lorem ipsum<br />
    Lorem ipsum<br />
    Lorem ipsum<br />
    Lorem ipsum<br />
  </div>
</div>


Share : facebook icon twitter icon

CSS three columns of fixed width and same hight


By : user3030722
Date : March 29 2020, 07:55 AM
I wish this help you The default value for vertical-align(applies to inline-level and table-cell elements) is baseline(baseline of the previous element), this is why you are experiencing that.
You could use vertical-align: top along with display: inline-block to prevent this.
code :
#container {
  height: 500px;
  width: 750px;
  background-color: black;
}
#left {
  background-color: #fcc;
  display: inline-block;
  vertical-align: top;
  height: 100%;
  width: 50px;
}
#middle {
  background-color: #cfc;
  display: inline-block;
  vertical-align: top;
  height: 100%;
  width: 100px;
}
#right {
  background-color: #ccf;
  display: inline-block;
  vertical-align: top;
  height: 100%;
  width: 590px;
}
<div id="container">
  <div id="left">left left left left left</div>
  <div id="middle">middle middle middle middle middle</div>
  <div id="right">right right right right right</div>
</div>

jQuery - Make hight value is the same width value


By : user3504295
Date : March 29 2020, 07:55 AM
fixed the issue. Will look into that further I try to make the width an height the same value.
code :
function getsquare(){
var getWidth = $(".square").width();
$('.square').css('height',getWidth +'px');
}
getsquare();
$(window).resize(function(){
getsquare()
});

How to make contents having equal space (width & hight) to resize upon changing of window size in XAML?


By : Ben Bliss
Date : March 29 2020, 07:55 AM
I wish this help you I have the following code of XAML in WPF. This generates the grid with equal size of columns & rows (as shown in figure 1.) , You can enforce size-sharing like this:
code :
<Grid Grid.IsSharedSizeScope="True">
    <Grid.RowDefinitions>
        <RowDefinition SharedSizeGroup="A"/>
        <RowDefinition SharedSizeGroup="A"/>
        <RowDefinition SharedSizeGroup="A"/>
        <RowDefinition SharedSizeGroup="A"/>
    </Grid.RowDefinitions>
    <Grid.ColumnDefinitions>
        <ColumnDefinition SharedSizeGroup="B"/>
        <ColumnDefinition SharedSizeGroup="B"/>
        <ColumnDefinition SharedSizeGroup="B"/>
        <ColumnDefinition SharedSizeGroup="B"/>
    </Grid.ColumnDefinitions>

Column-Based Grid with Cells of equal hight


By : ke3mpl
Date : March 29 2020, 07:55 AM
I think the issue was by ths following , I have a table-like layout which needs to be responsive . The problem i'm having is that the columns need to be the same width as the screen on mobile devices and displayed side-by-side on a tablet or normal screen. , You can use display: flex; with flex-wrap: wrap; here.
code :
.column {
    width: 12.5%;
    min-width: 200px;
    height: 100%;
    display: flex;
    flex-wrap: wrap;
}

.column .cell {
    padding: 10px;
    border: 1px solid #aaa;
    box-sizing: border-box;
    background-color: #FFF;
    flex: 1 0 auto;
    width: 50%;
}

.column .cell span {
  padding: 5px;
  display: block;
}
<div class="table">
  <div class="row">
    <div class="cell">
      row 1 col 1
    </div>
    <div class="cell hide-on-small">
      row 1 col 2
    </div>
    <div class="cell hide-on-small">
      row 1 col 3<br/>with more content
    </div>
  </div>
  <div class="row">
    <div class="cell">
      row 2 col 1
    </div>
    <div class="cell hide-on-small">
      row 2 col 2
    </div>
    <div class="cell hide-on-small">
      row 2 col 3
    </div>
  </div>
  <div class="row">
    <div class="cell">
      row 3 col 1<br/>with more content
    </div>
    <div class="cell hide-on-small">
      row 3 col 2
    </div>
    <div class="cell hide-on-small">
      row 3 col 3
    </div>
  </div>
</div>
@media (min-width: 768px) {
    .table { display: table; }
    .row { display: table-row; }
    .cell { display: table-cell; }
}

.cell {
  padding: 10px;
  border: 1px solid grey;
}

@media (max-width: 767px) {
  .hide-on-small {
    display: none;
  }
}

grid css the hight of two divs isnt equal


By : dglunz
Date : March 29 2020, 07:55 AM
will be helpful for those in need im making a html css website however the high of the second div isnt equal with the first div here is the code : , Replace .header and .ThirdDiv styles with the next ones:
code :
.header {
    display: grid;
    grid-template-columns: 70% 30%;
    height: 400px;
    grid-row-gap :2%;
    grid-column-gap: 0.5rem;
    margin-left: 1rem;
    margin-right: 1rem;
}
.ThirdDiv {
    display: grid;
    grid-template-rows: 49% 49%;
    grid-row-gap :2%;
}
Related Posts Related Posts :
  • Is there a way to make a div push/move another div when it expands/moves/displays on hover using only HTML & CSS?
  • Too much of a space between columns in html table
  • There is nothing displayed in my Angular App
  • How to remove the white background of an image HTML-CSS?
  • PrimeNG Datatable with row exansion call new service and display data in a row Angular 5
  • Size of picture in background repeat?
  • Force screen reader to read numbers as individual digits
  • Error: Your a element should be nested within your new p element
  • How to extract a column from this generated table?
  • Change an SVG Fill on Hover
  • how to force link open on a new tab on iFrame?
  • How do you disable browser Autocomplete on web form field / input tag?
  • How do I make a checkbox toggle from clicking on the text label as well?
  • How do I give my web sites an icon for iPhone?
  • How to break word after special character like Hyphens (-)
  • Multiple submit buttons in an HTML form
  • Percentage width child element in absolutely positioned parent on Internet Explorer 7
  • shadow
    Privacy Policy - Terms - Contact Us © voile276.org