Page 1 of 1

Images with css

Posted: Tue Dec 17, 2013 12:17 pm
by Jordi Niubo

hello

I have a basic but difficult problem for me because I do not know very well CSS

Starting with a blank screen

I want to add a centered image on the screen that is the size is,for example, 30% x 30% of screen

My code works if I put in "px" but I need to be responsive. I tried with "%" but does not work

I've done it on a text area and the position work but not the size 30% x 30% of screen.

textarea[name=text] {
position:fixed;
left:50%;
top:50%;
}

[name=image] {
position:fixed;
left:50%;
top:50%;
}

Can you help me? thanks!


Images with css

Posted: Tue Dec 17, 2013 12:49 pm
by Maryna Brodina

Hello! Add class for image, for example centered and describe this class in CSS pre.centered{
width:30% !important;
height: 30% !important;
margin: 0 35% !important;
}/pre