Forum : Understanding px
Brief description  about Online courses   join in Online courses
View Murali  Mohan 's Profile

Understanding px

Hi All,
I have inserted an image in the page and have used CSS div, wherein when using width:400px the image moves towards right side increasing the width brings the image close to the left hand side of the page.

So I could not correlate px in terms of web page, can anybody share thier inputs/views on px in terms of usage in web pages.
Asked by Murali Mohan | Nov 28, 2009 |  Reply now
Replies (2)
View murali mohan 's Profile
Hi Mahipal,

Thanks for your reply

Dec 18, 2009
View mahipal soni 's Profile
Hi Murali Mohan,

If your DIV is on right side and you are inserting an image which is larger than the width you have assigned to the DIV it will definitely move out of the assigned width; either keep the image of same width, or restrict the visibility of image to the available DIV area. If you provide the exact code I can be able to help you.

for the second part, you want to know about px(pixels) and its usage on web pages. what I think you are concerned with the pixels, are actually divided into the resolution you keep of your screen(monitor) typically 800 X 600 or 1024 X 768(popular), when you say an image of 400px X 300px it will acquire half the screen in the first screen resolution and lesser in the second screen resolution. well that you can try that by using a div for a size and giving it some background color. pixels mainly depends on properties like, its weight, its size to display on the screen.

Dec 1, 2009