Jordi Niubo
Posts: 0
Joined: Tue Nov 26, 2013 12:08 pm

Images with css

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!

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Images with css

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

Return to “Issues”