Anyone know why the jpg isn't switching correctly? And why are the dimensions off?
Himanshu_2301
@Himanshu-196018All comments
- @beowulf1958Submitted about 1 year ago@Himanshu-196018Posted about 1 year ago
Hello @beowulf1958,
If you want to switch between different images, it is recommended to use
<picture>
tag, through which you can switch between different images according to width of your browser window.For the dimensions try using
min-width
andmax-width
property withwidth
for better responsive design. Same for height. For example:.card-container { width: 100%; min-width: 20rem; /* give min width of your own */ max-width: 40rem; /* give max width of your own */ }
I hope this will solve your problems a little bit.
Happy Coding
Marked as helpful1 - @kevoECSubmitted about 1 year ago
Why in my border of my button it's dividen in twice, white and gray. I wanted to make all my border white
@Himanshu-196018Posted about 1 year agoHello, @kevoEC as of you are giving your element border radius with
border-top-left
etc. and not usingborder-radius
shorthand property, that's why the element gets default style for the property you didnt't define explicitly.-
To correct your border of the button try applying
border: 1px solid #ffffff
. It will correct the border styling of your button element. -
Instead of giving style to each side of border separately try using shorthand properties. For example, instead of using
border-top-left-radius
,border-top-right-radius
,border-bottom-right-radius
, andborder-bottom-left-radius
useborder-radius: [top-left] [top-right] [bottom-right] [bottom-left]
. You can check mdn docs for more shorthand property.
I hope this will solve your current problems and in future too.
Happy coding.
0 -
- @nadezhda-frunzaSubmitted about 1 year ago
My 6th challenge! This time I used a little bit of JavaScript, and plan to use it more and more in my future projects.
@Himanshu-196018Posted about 1 year agoHello @nadezhda-frunza, It looks good.
Btw I have gone through your code and looked around a bit, your button seem a bit mispositioned. You can give <form> element a position relative to align your button more accurately same goes for error icon too.
I hope this was helpful.
Marked as helpful0 - @OLMA08Submitted about 1 year ago
All feedback is welcome
@Himanshu-196018Posted about 1 year ago@OLMA08 You are doing great.
I have gone through your solution and there are things you should take notes on:
- If you are trying to access local files/folders in your current directory avoid "/" at start of your source (like <img src="images/icon.png" />).
- Make your text visible and easy to read by applying some different color property.
I hope this will be helpful for you.
1