'Why my css float didn't do what i expect?
I'm trying to do a website and I've got a problem. My CSS Float is not doing what i want.
This is my HTML Code:
<div class="slider-menu">
<div class="slider-box">
<img src="agac.jpg">
</div>
<button class="prew">-</button>
<button class="next">+</button>
</div>
This is my CSS Code
.slider-menu{
width: 1250px;
height: 500px;
margin: 20px auto;
position: relative;
border: 10px solid black;
box-shadow: 0px 0px 5px 2px;
}
.slider-menu button{
padding: 20px;
background: #37f;
font-size: 30px;
color: white;
position: absolute;
transform: translate(0, -50%);
top: 50%;
}
.next{
left: 100%;
float: right; // This Float Code
}
.slider-box {
width: inherit;
height: inherit;
display: flex;
justify-content: center;
align-items: center;
}
.slider-box img{
width: inherit;
height: inherit;
}
When I do this it looks like this:

I want the "+" button inside the border. How can I do it?
Solution 1:[1]
You need to change in .next class. As you have used the absolute property, you can use "right" property instead of using the "float". Try using this.
.next
{
right:0;
}
Solution 2:[2]
There is many options. But I will present only 2:
- You can do nothing and use external table in BigQuery, that means you let the data in Cloud Storage and ask BigQuery to request the data directly from Cloud Storage. You don't duplicate the data (and pay less for storage), but the query are slower (need to load the data from a less performant storage and to parse, on the fly, the CSV) and you process all the file for all queries. You can't use BigQuery advanced feature such as partitioning, clustering and others...
- Perform a BigQuery load operation to load all the existing file in a BigQuery table (I recommend to partition the table if you can). For the new file, forget the old school scheduled ingestion process. With cloud, you can be event driven. Catch the event that notify a new file on Cloud Storage and load it directly in BigQuery. You have to write a small Cloud Functions for that, but it's the most efficient and the most recommended pattern. You can find code sample here
Just a warning on the latest solution, you can perform "only" 1500 load job per day and per table (about 1 per minute)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Aman singh Parihar |
| Solution 2 | guillaume blaquiere |
