+ 1
about size/resize, and measurements: when assigning width or height, px is often! how many px's are there per inch or per cm? for width, it is convenient, with some other measurements applicable, but for height? px's is rather imperceptible! I tried to attribute a certain height in my code, what is best: px, rows, number of lines or what?
getting on frames , tables, forms, image resize, height attribute is embarrassing?
3 odpowiedzi
+ 1
In web design, people used to talk about two main layout types: fluid using percentages and fixed layout using pixels. Now they add to them responsive layout which includes design for mobiles and tablets.
Pixel size is unscalable, fixed. No matter the screen size, the pixel sized element will look the same. Elements with % size will scale according to screen size or parent container size.
Use px for elements that you want to have a fixed size. Use it also for borders, shadows, border-radius and similar.
Use % for fluid elements when you want them to scale up and down.
There are other measurement units like em and pt. You also need to read a thorough tutorial for better and deeper understanding of this important subject.
0
As someone just starting coding myself, the reality I've noticed, even amongst expert coders, is that when it comes to measurements, it's really based on individual preference and understanding. If you perceive the concept of px better, go with that. Bogging yourself down with correlations in the beginning only makes the work twice as difficult. When you correctly input and assign px measurements, you'll eventually get the dimensions you're looking for. So much of coding is trial and error, so if things aren't immediately falling into place for you, don't be discouraged! Keep hammering away at the measurements, check your math, and you'll get the desired outcome.
0
i am new to coding and i learned all using px. to be fair, using a software that gives you thr screen in px is most helpful. i tried using dreamweaver cs 5 and 6 and both found very easy to use and gives you the page in px.+ plus you can resize it to match any particular screen if you need. cs6 also is fast to use. also my last point goes the same as previous answer. twick with the size until you get what you want.. good luck