Relative Content

Tag Archive for cssresponsive-design

Text length in pixel seems to be different on different size monitor with same resolution

I want to make my website responsive and use some css to calculate text length and left position. I want to place something at the end of the text and to find the left position (or the end of text), I use the font width x number of letter to get the text length in px. Now, here is the question, why it looks different on my 2 monitors since its the same resolution? One is larger than the other, but same resolution, so normally if my text is 10px and have 10 letter, if should gives 100px wide and on the other screen, it should also be 100px even if the px are larger or smaller, but its really different. Any ideas on this? I must forget about something!

How can I do this with CSS

I have an application that has this design. The white sidebar thingy should look exactly like in the pic. I need some CSS wizard to help me figure out how to make it happen.

media query for min-width:319px) and (max-width:480px) not working on chrome but other browsers while @media(min-width:1601px) is not working anywhere

<!DOCTYPE html> <html lang=”en”> <head> <meta charset=”UTF-8″> <meta name=”viewport” content=”width=device-width, initial-scale=1″ /> <title>Media Query</title> <style> body { background-color: aquamarine; } @media(min-width:319px) and (max-width:480px) { body { background-color:lightsalmon; } } @media(min-width:481px) and (max-width:1200px) { body { background-color:powderblue; } } @media(min-width:1201px) and (max-width:1600px) { body { background-color:limegreen; } } @media(min-width:1601px) { body { background-color:seagreen; } } </style> […]