PDA

View Full Version : % vs. Pixels


orso
02-02-2007, 01:34 PM
I was wondering the differences between % and Pixels in the property box. I know the obvious but I was wanting to pick your brains about it. What are the advantages and disadvantages of them and which is better to use and why? Also any tips that you have would be great.

Remeber Im a newbie so its a newbie question. Don't want to get yelled at again. You know yall should have a newbie board for people like me.

davidj
02-02-2007, 01:52 PM
I was wondering the differences between % and Pixels in the property box. I know the obvious but I was wanting to pick your brains about it. What are the advantages and disadvantages of them

% is relevant to the size of the browser and will always be 90% or whatever you have set to that size so even if i shrink the browser you will always be that % size. Pixels however are fixed so will always be 400px wide no matter what size the browser is. Hope this makes sence coz i have confused myself


which is better to use and why?

it really depends on your design and how you want it to look when the browser is resized

Also any tips that you have would be great.

CSS is on everyones lips so i should jump on the band wagon and say use CSS for layout

Remeber Im a newbie so its a newbie question. Don't want to get yelled at again.

Who yelled at you?? Im gona kick their ass!

You know yall should have a newbie board for people like me.


this board is a nubee board!

orso
02-02-2007, 01:58 PM
LOL. I cant remember. They thought I was more then I was.

I was just experimenting and have some glitches (I cant keep it contstrainded, I published one and the box was off the screen when it should only take a 1/3 of it) and was wondering what works best. Kind of the does and dont.

I know you have to use them or they are recommended with html emails I was jsut wondering about site. How often do you use either one.

davidj
02-02-2007, 02:16 PM
you always set a size in a site

you could have a fluid table % but you could fix the sizes of a couple of columns using px and have just 1 column that expands when the browser is resized

it really depends on your design.

i always design my sites in photoshop and make my decision whether its going to use % or fixed px early in the design stage

another way of looking at this is screen resolution. There are allot of different rez's out there so larger resolutions will use a % method better than a fixed size because the site would look very simlar to the way you designed it across all screensizes and with weird wide-screen monitor sizes becoming more popular the % option leaves one thing less to worry about

domedia
02-02-2007, 02:35 PM
orso, this is pretty much up to personal preference, but I would list the advantage like this:

An absolute width set in pixels:
-More control over how interface displays in browsers
Relative width:
-Flexible layout that easier adapts to client browser

As far as 'fluid' websites go, there's actually a couple of ways you can do it. In addition to setting all values to percentages, you can also measure width in EM. Since it's based on font-size, users, that increase font size wlil also see the GUI expand.

dj, percentages can be confusing indeed. Width is relative to the parent element, the available space. Since % is a relative term, 100% is simply all the space available. A width set to 90%, would be 10% narrower than the available width. If you think about the available width in the BODY element, it will have default margin, unless other margin is set. This is still 100% of the available width for the child element. The key question on relative sizes is 'relative to what?'

orso
02-02-2007, 05:48 PM
Great thanks guys. This helps me understand what im reading alot. Any chance any of you live around new york city. I would love just to sit down and talk to somebody. Its all me, the forum, and my books right now.

davidj
02-02-2007, 05:54 PM
if only

that would be cool but im in the UK