+ 2
How exactly do you use percentage height correctly?
When I asign width: 40%; to a div with a paragraph it works like intended, however, if I try to do it with height:50%; it just compresess to the paragraph. I Also tried with pixels and it does changes height, so I don't understand what's wrong.
24 odpowiedzi
+ 4
Try adding the following to your '.box1'. At the moment you only have it in '.box1 p'.
position:absolute;
+ 3
Can you post your code for us? Many reasons for why that could be happening. The % is based upon the parent container, rather than the page itself, so that could potentially be your problem. Again, it's hard to say without reading your code.
+ 3
Bebida Roja to mention another user, if you type the '@' symbol it should pop up a list of names of people active on the post. You can also just start typing the name after the '@' symbol to reduce the list or start searching for others.
+ 2
Peter Mx
position absolute means you are positioning absolutely. If left:0 then the element will be in the 0th pixel on the left. But if the parent element has position relative it will be positioned based on the parent element.
+ 2
Good to hear. I'm still learning about css and don't know enough to explain sorry.
+ 1
oops sorry, I was testing whit pixels and forgot to change it
+ 1
It happens sometimes Peter Mx
+ 1
positionn in the css is miswritten.
+ 1
I was trying to mention without the @. Now its all good. Thank you Sololearners ;)
+ 1
Duncan it worked! thanks! But mind telling me what position absolute did? I really sant to know
+ 1
Its all about the better of us (Y)
Peter Mx
0
A good check is to check if margin and padding are on 0.
0
Did you found anything I missed?
0
Fata1 Err0r
50% of the parent element.
0
Off topic. How to cite some user? its not working for me and I have the last version.
0
For me it doesnt change, maybe is a problem with my device?
0
Sololearn compiler is the same for all of us.
0
I tried with only one div and I deleted the paragraph bit it still compresess