What's new

loktoy

Eternal Poster
Joined
Oct 20, 2014
Posts
1,168
Solutions
2
Reaction
103
Points
497
Age
30
ok na po kaso yun kulay Violet naman hindi sumunod sa agos makikita sa picture po
html code :
<div class="events">
<ul>
<li class=" time-container" id="time-container">
<div class="time">
<h2>May <br>1<span><br>2023</span></h2>
</div>
<div class="details" id="details1">
<h3>Title</h3>
<p>Lorem ipsum, dolor sit amet consectetur adipisicing elit. Facere, voluptates reprehenderit officia quaerat numquam expedita temporibus, consequatur dolorem dolorum, necessitatibus et id doloremque incidunt explicabo maiores tempora veritatis quae eos?</p>
</div>
</li>
<li>
</ul>
</div>

<script>
var details = document.getElementsByClassName('details');

for (var i = 0; i < details.length; i++); {
var content = details.querySelector('p');
var height = content.offsetHeight;
details.style.height = height + 'px';
}
</script>

css code :

section .events {
position: relative;
width: 60%;
height: 100%;
background: rgb(88, 88, 88);
float: right;
box-sizing: border-box;
}
section .events ul {
position: relative;
top: 2%;
transform: translateY(-50%);
margin: 0;
box-sizing: border-box;
}
section .events ul li {
list-style: none;
background: #fff;
box-sizing: border-box;
height: 180px;
float: left;
}
section .events ul li .time {
position: relative;
padding: 20px;
background: rgb(96, 6, 212);
box-sizing: border-box;
width:25% ;
height: 100%;
float: left;
text-align: center;
transition: .5s;
}
section .events ul li:hover .time{
background: red;
}
section .events ul li .time h2{
position: absolute;
margin: 0;
padding: 0;
top:50%;
left: 50%;
transform: translate(-50%,-50%);
}
section .events ul li .details {
padding: 20px;
background: #fff;
box-sizing: border-box;
width: 75%;
float: left;
}


1.JPG
 

Attachments

To change the color of the background in the time container to violet, you can modify the CSS code for .time selector from rgb(96, 6, 212) to the hexadecimal code for violet, which is #EE82EE. Here's the updated CSS code:

Code:
section .events ul li .time {
  position: relative;
  padding: 20px;
  background: #EE82EE;
  box-sizing: border-box;
  width:25% ;
  height: 100%;
  float: left;
  text-align: center;
  transition: .5s;
}

Save the changes and refresh the page to see the updated color.
 
To change the color of the background in the time container to violet, you can modify the CSS code for .time selector from rgb(96, 6, 212) to the hexadecimal code for violet, which is #EE82EE. Here's the updated CSS code:

Code:
section .events ul li .time {
  position: relative;
  padding: 20px;
  background: #EE82EE;
  box-sizing: border-box;
  width:25% ;
  height: 100%;
  float: left;
  text-align: center;
  transition: .5s;
}

Save the changes and refresh the page to see the updated color.
hindi po color po kasi kapag nalalagay ako ng maraming text sumasabay na na humahaba yun background white pero yun background violet ay naka stay lang nakafixed
 
hindi po color po kasi kapag nalalagay ako ng maraming text sumasabay na na humahaba yun background white pero yun background violet ay naka stay lang nakafixed
I apologize for misunderstanding your issue earlier. To ensure that the background color of the time container always extends to the full height of its parent container regardless of the amount of content, you can add the CSS property min-height: 100%; to the .time selector. Here's the updated CSS code:

Code:
section .events ul li .time {
  position: relative;
  padding: 20px;
  background: #EE82EE;
  box-sizing: border-box;
  width: 25%;
  min-height: 100%;
  float: left;
  text-align: center;
  transition: 0.5s;
}

This ensures that the background color of the time container will always extend to the full height of its parent container even if the content inside the time container has expanded, while still maintaining the fixed width of 25%.

Save the changes and refresh the page to see the updated behavior.
 
I apologize for misunderstanding your issue earlier. To ensure that the background color of the time container always extends to the full height of its parent container regardless of the amount of content, you can add the CSS property min-height: 100%; to the .time selector. Here's the updated CSS code:

Code:
section .events ul li .time {
  position: relative;
  padding: 20px;
  background: #EE82EE;
  box-sizing: border-box;
  width: 25%;
  min-height: 100%;
  float: left;
  text-align: center;
  transition: 0.5s;
}

This ensures that the background color of the time container will always extend to the full height of its parent container even if the content inside the time container has expanded, while still maintaining the fixed width of 25%.

Save the changes and refresh the page to see the updated behavior.
makikita po sir sa video po na di po naaddjust

 

Attachments

makikita po sir sa video po na di po naaddjust

View attachment 2634184
I apologize for the confusion. Without seeing the video you mentioned, it's difficult for me to understand the issue you're facing. If the background color is still not extending to the full height of the parent container, you can try adding the CSS property height: 100%; to the .time selector as well. Here's the updated CSS code:

Code:
section .events ul li .time {
  position: relative;
  padding: 20px;
  background: #EE82EE;
  box-sizing: border-box;
  width: 25%;
  height: 100%;
  min-height: 100%;
  float: left;
  text-align: center;
  transition: 0.5s;
}

This should ensure that the background color of the time container extends to the full height of its parent container.

If this does not solve your issue, please provide more details or the video you mentioned so that I can better understand the problem and provide a solution.
 
makikita po sir sa video po na di po naaddjust

View attachment 2634184
I apologize for the confusion. Without seeing the video you mentioned, it's difficult for me to understand the issue you're facing. If the background color is still not extending to the full height of the parent container, you can try adding the CSS property height: 100%; to the .time selector as well. Here's the updated CSS code:

Code:
section .events ul li .time {
  position: relative;
  padding: 20px;
  background: #EE82EE;
  box-sizing: border-box;
  width: 25%;
  height: 100%;
  min-height: 100%;
  float: left;
  text-align: center;
  transition: 0.5s;
}

This should ensure that the background color of the time container extends to the full height of its parent container.

If this does not solve your issue, please provide more details or the video you mentioned so that I can better understand the problem and provide a solution.
di pa rin po sir mafix po ginawa ko na po
 
di pa rin po sir mafix po ginawa ko na po
I'm sorry to hear that the previous solution did not work for you. Without further information or a better understanding of the issue, it's difficult to provide an accurate solution.

However, you can try the following troubleshooting steps:

1. Check if there are any conflicting styles that may affect the layout of the time container. You can use a browser's developer tools to inspect the CSS styles applied to the element.

2. Ensure that the parent container of the time container has a fixed height so that the time container can stretch to its full height. If the parent container does not have a fixed height, the time container may not be able to extend to its full height.

3. Try using the CSS Flexbox layout to ensure that the time container stretches to its full height. You can set the parent container to display: flex; and the time container to flex: 1;. This ensures that the time container grows to fill the remaining space in the parent container.

If none of these solutions work or if you need further assistance, please provide more information or the video you mentioned so that I can better understand the problem and provide a solution.
 
I'm sorry to hear that the previous solution did not work for you. Without further information or a better understanding of the issue, it's difficult to provide an accurate solution.

However, you can try the following troubleshooting steps:

1. Check if there are any conflicting styles that may affect the layout of the time container. You can use a browser's developer tools to inspect the CSS styles applied to the element.

2. Ensure that the parent container of the time container has a fixed height so that the time container can stretch to its full height. If the parent container does not have a fixed height, the time container may not be able to extend to its full height.

3. Try using the CSS Flexbox layout to ensure that the time container stretches to its full height. You can set the parent container to display: flex; and the time container to flex: 1;. This ensures that the time container grows to fill the remaining space in the parent container.

If none of these solutions work or if you need further assistance, please provide more information or the video you mentioned so that I can better understand the problem and provide a solution.
sir ito po yun video sana po mapanood mo po

 

Attachments

AI ang kausap mo, hindi yan nanonood ng video, dapat idescribe mo ng maayos yung issue para matulungan ka niya.
ay sorry po sir baka po ikaw sir matulongan mo po ako baka po nakita mo po video baka po matulogan mo po ako sa problima ko po sir
 

Similar threads

Back
Top