I have a list of images as shown in fiddle in which I have aligned images in a straight line.
In the fiddle, the last logo (as shown in the screenshot below marked by a red circle) seems to resize and I am not sure what are the reasons behind that.
The CSS codes which I have used in order to align the images in a straight line are:
.images {
display: flex;
justify-content: space-between;
align-items:center;
background-color: #eee;
padding: 1rem;
flex-wrap: wrap;
}
.images img {
width: auto;
height: 2.5rem;
}
Problem Statement:
I am wondering what changes I should make in the CSS codes so that the last logo (emma marketing logo) should have the same size as other logos. At this moment, the size of every image is set to auto and height to 2.5rem
On inspect, the logo seems to resize as shown below marked by the red arrows.
You need to crop the last picture, as you can see there's a large transparent area around it.
Related
I'm trying to make a border image cover the entire div. It is one whole image that I kind of want as a background. The problem is, the image gets cut off at the top.
This is what I have: enter image description here
The red is the border image, and the black boxes are the divs.
Here is what I want, and what the border image is supposed to look like:
enter image description here
Here is my CSS:
.sheet-misc-container {
flex: 1 1 auto;
display: flex;
flex-direction: column;
width: 260px;
}
.sheet-stats {
flex: 0 1 auto;
display: flex;
flex-wrap: wrap;
justify-content: space-evenly;
max-height: 244px;
border-image: url(image) 30;
padding:20px;
margin-top:-30px;
}
I tried to extend the padding, but the image keeps getting cut off, I'm a little new to CSS so I'm not sure what to do.
his is a screenshot of the localhost webpage:
[faulty image removed]
This is a screenshot of the deployed webpage with vercel:
The problem is that the gray div shows its underlying elements.
.zoombackground {
background-color: #333;
left: 0;
top: 0;
width: 100%;
height: 100%;
position: fixed;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
z-index: 9999999999999999999999999 !important;
}
(Assuming you're trying to make it so the color grey covers those images)
I would definitely suggest changing the format of what you're trying to do. You're using a background as a foreground, and trying to keep the elements below that foreground visible at all times. I would instead recommend making the elements in the div hidden until you want them to be shown, while keeping either the div at the same size and just being grey, or making the div relatively expand when you want the images to appear
I am working on a fiddle in which I want to horizontally scroll the stripe, Global Franchise and other images as present in a line in the fiddle. The text above the images should remain fixed in its position.
The snippet of what I want in mobile view is shown below. The images should scroll horizontally without creating any white space at the right.
At this moment, the images are fit to screen on mobile but they are compressed so that's the reason why I want to make the contents scrolling in mobile view in order to avoid the compression issue.
The CSS codes which I have used in order to fit the images on the screen in a mobile view are:
.images {
display: flex;
align-items:center;
background-color: #eee;
padding: 1rem;
}
.images > div {
flex-basis: 0;
flex-grow: 1;
max-width: 100%;
padding-left: 15px;
padding-right: 15px;
}
.images img {
max-width:100%;
width: 100%;
}
Problem Statement:
I am wondering what CSS codes I should add in the fiddle so that images should scroll horizontally without creating any white space at the right with the text being fixed on the top.
Hey I'm trying to give grey color to my whole page and I want it to be consistent throughout all screen sizes whether or not there is any content inside it.
Here is the CSS I gave:- (outer-modal-container is my main Div)
.outer-modal-container {
background: grey !important;
width: 100%;
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: center;
align-items: center;
}
but the problem I'am facing is until and unless I enter any element, like a row or some text, "outer-modal-container" dosent show up(Grey color dosent show up). outer-modal-container expands or adjusts its height with the elements inside it. What am I doing wrong?
I'm trying to Vertical centering picture on my page
i tried few scripts & styles but none of them worked
my page is:
TEST.esc.bugs3.com
I'm trying to Center the "Arrow" pic on the left & right sides to the center of the main pic
today all i get is the pic is always on the "TOP" of the DIV & i wish to put in in center
Note: I don't wanna use fix size as PX i wish to make it with 50%
like main pic is the 100% height and the arrow will be show on 50% of it
Layout - how i wish it will look like
thanks for the help :)
Edit:
thanks for the answers
but i need the side div (side box) to be Vertical centered to the main div (center box)
the main pic size is not fixed (every media will have different size - so i cant use PX as position
Use CSS3 Flexbox for modern Browsers: Here's Browser support for it.
.center-both{
display: flex;
justify-content: center;
align-items: center;
height: 350px;
background: LightSeaGreen;
}
Fiddle
Read this article for more on flexbox: http://dipaksblogonline.blogspot.in/2014/05/css-flexbox-explained-with-examples.html
If you want to support old browsers like IE7/IE8 then use display: table-cell; property to place the content vertically center.
Change the css for Sidepanel class as below
.SidePanel {
width: 5%;
height: auto;
float: left;
background-color: green;
display: flex;
justify-content: center;
align-items: center;
}
Use This Code For Your Pic:
.pic{
position: absolute;
top: 50%;
margin-top: -(HEIGHT/2)
}
Which HEIGHT is Your Picture's height in Pixels.
Update 1
Your Container Should Have A Specific Height And Have A CSS Property: Position: (Relative|Absolute|Fixed)