Hi all, I've lots of questions regarding this topic.
First, regarding EM. Would it be proportionate to the page or just the default font size? If say I put
<style type="text/css">
body { font-size:20px; }
</style>
Will a default "EM" be set to 20 pixels? I'm not sure of what it means. Thus, would using EM to size objects and fonts be wise?
Second, how do you ensure that objects appear of correct proportion to the browser window size? Using percentages seems to work for sizes, but what about distances?? Positioning objects using percentages sounds strange to me. What about using "position:relative"?
Thirdly, will usage of "universal" sizes like CM or IN (inches) work better for this case?Originally posted by Xeenslayer
Hi all, I've lots of questions regarding this topic.
First, regarding EM. Would it be proportionate to the page or just the default font size? If say I put
<style type="text/css">
body { font-size:20px; }
</style>
Will a default "EM" be set to 20 pixels? I'm not sure of what it means. Thus, would using EM to size objects and fonts be wise?
Traditionally em = the size of the (capital) letter 'M'.
Depending on how the actual font "looks like" 1 em might not be exactly 20px.
However 1 em will always be the same size "as the font". Thus setting a size for a box in em will make the box shrink and grow if the user changes the page default fontsize.
So yes, it's often advantageous to use em (or ex = size of 'x') when making layout since it enabels the layout to "scale with the fontsize".
In general however I would advice against using font-size specified in pixels. There is a bug in IE that makes it impossible for eg a visiually impared user to change font-size if you specify it in pixel.
Usually a better suggestion is simply to rely on that the user is bright enough to specify their own preferd fontsize that works well in their specific situation. By using font-sizes in % and keeping the page main content as size 100% and wroking with em or ex sizes where apropriate, you usually get a solution that works the best in most situations for your visitors.
Second, how do you ensure that objects appear of correct proportion to the browser window size? Using percentages seems to work for sizes, but what about distances?? Positioning objects using percentages sounds strange to me. What about using "position:relative"?
That's a bit complex to answer. Every page solution need to be looked at specifically to decide what works the best.
Generally though, if you eg specify a width of 80%, also specifying margins, paddings, positioning etc in % is probably a good idea also.
However there's no ultimate solution that works the best in all cases.
Thirdly, will usage of "universal" sizes like CM or IN (inches) work better for this case?
No, using absolute lenght units like inches is a very bad idea on a monitor, becuse there is simply no wayfor you to know how large an "inch" will look like on someone elses screen (OS, monitor, resolution etc will affect this to a large degree).
However if you are trying to make a .CSS for how a page should look on a printed paper, cm and inches are very good measures.
While it doesn't work well in the "electronic world", on a printed paper an inch really IS an inch.By using font-sizes in % and keeping the page main content as size 100% and wroking with em or ex sizes where apropriate, you usually get a solution that works the best in most situations for your visitors.
It is difficult to achieve what you have said (for me at least). I am not quite sure when to use EM and EX since these vary with the user's default font size (like you have said). I have tried experimenting and found that because of this problem, it can be difficult to position things due to a change in font sizes. I would love to know how percentages for positioning can be used smoothly with EM/EX for font sizes.
Font sizes in percentage? An example please?Originally posted by Xeenslayer
It is difficult to achieve what you have said (for me at least). I am not quite sure when to use EM and EX since these vary with the user's default font size (like you have said). I have tried experimenting and found that because of this problem, it can be difficult to position things due to a change in font sizes.
Depends on how you build your page. Usually you should eg never position:absolute anything into an area where normal content "lives", only to outside margins.
If you do that positioning works just fine.
Eg
<body style="margin-left:10ex">
<div style="position:absolute; top:10px; left:2ex; width:6ex;"></div>
Font sizes in percentage? An example please?
font-size:100%
font-size:150%
font-size:75%
By default on windows font-size: 100% = 16px = 13pt
(Of cource pt should never be used on screen, it's just stated for comparative reasons.)So by giving font sizes a percentage, are we also giving it a fixed size?
eg.
font-size:50% = 8px;
font-size:150% = 24px?Originally posted by Xeenslayer
So by giving font sizes a percentage, are we also giving it a fixed size?
eg.
font-size:50% = 8px;
font-size:150% = 24px?
Yes, until the user changes the default fontsize of cource.
The important thing though is that the relative size between different sections will remain the same (eg something with font-size:50% will be 1/3rd the size of 150% even if eg the default usersize is 20px instead of 16px )I don't know a lot about ccs, javascript, or anything else for that matter.
But I've managed to put together a website that looks pretty much the way I want it to in my browser (I.E.) The javascripts I use are cut & paste, tho' I've managed to make a few changes so that they'll do what I need.
I know nothing about "objects", "methods," etc. The successful changes I've made in scripts are the result of a lot of guesswork and persistence!
I've asked questions on several different forums, and the answers I've received were usually 'way over my head...Here's my problem:
My site is dog related. Most of the people who visit don't even know as much as I do about screen resolutions, etc! They aren't going to make any changes in their settings to accomodate my site.
As more and more people are using larger monitors and higher resolutions, I would like to re-design my site so that it looks as good at higher resolutions as it does at 600 x 800.
I would think that using percentages rather than absolute sizes might be the answer. My site has a lot of images, and many pages have multiple slideshows in InLine Frames.
I don't even know where to start!
Would one of you mind taking a look at my site, and giving me some suggestions?
Here's a link:
Regardless Shorthairs (<!-- m --><a class="postlink" href="http://www.regardless-shorthairs.com">http://www.regardless-shorthairs.com</a><!-- m -->)Originally posted by Judy
I don't even know where to start!
Well I would start with fixing all the HTML errors so you have a firm base to stand on onto which you can apply your CSS and JavaScript.
Eg something like this will start you of in the right direction
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Script-Type" content="text/javascript">
<meta http-equiv="Content-Style-Type" content="text/css">
<title></title>
<style title="Default" media="screen" type="text/css">
body {background:black url(Xmas/Xmas_Page1.jpg) 50% 50% no-repeat;}
</style>
</head>
<body>
</body>
</html>
Also, as you add markup to your page you can do a basic check for if what you do is correct or not by visiting this page
<!-- m --><a class="postlink" href="http://validator.w3.org">http://validator.w3.org</a><!-- m -->
First, regarding EM. Would it be proportionate to the page or just the default font size? If say I put
<style type="text/css">
body { font-size:20px; }
</style>
Will a default "EM" be set to 20 pixels? I'm not sure of what it means. Thus, would using EM to size objects and fonts be wise?
Second, how do you ensure that objects appear of correct proportion to the browser window size? Using percentages seems to work for sizes, but what about distances?? Positioning objects using percentages sounds strange to me. What about using "position:relative"?
Thirdly, will usage of "universal" sizes like CM or IN (inches) work better for this case?Originally posted by Xeenslayer
Hi all, I've lots of questions regarding this topic.
First, regarding EM. Would it be proportionate to the page or just the default font size? If say I put
<style type="text/css">
body { font-size:20px; }
</style>
Will a default "EM" be set to 20 pixels? I'm not sure of what it means. Thus, would using EM to size objects and fonts be wise?
Traditionally em = the size of the (capital) letter 'M'.
Depending on how the actual font "looks like" 1 em might not be exactly 20px.
However 1 em will always be the same size "as the font". Thus setting a size for a box in em will make the box shrink and grow if the user changes the page default fontsize.
So yes, it's often advantageous to use em (or ex = size of 'x') when making layout since it enabels the layout to "scale with the fontsize".
In general however I would advice against using font-size specified in pixels. There is a bug in IE that makes it impossible for eg a visiually impared user to change font-size if you specify it in pixel.
Usually a better suggestion is simply to rely on that the user is bright enough to specify their own preferd fontsize that works well in their specific situation. By using font-sizes in % and keeping the page main content as size 100% and wroking with em or ex sizes where apropriate, you usually get a solution that works the best in most situations for your visitors.
Second, how do you ensure that objects appear of correct proportion to the browser window size? Using percentages seems to work for sizes, but what about distances?? Positioning objects using percentages sounds strange to me. What about using "position:relative"?
That's a bit complex to answer. Every page solution need to be looked at specifically to decide what works the best.
Generally though, if you eg specify a width of 80%, also specifying margins, paddings, positioning etc in % is probably a good idea also.
However there's no ultimate solution that works the best in all cases.
Thirdly, will usage of "universal" sizes like CM or IN (inches) work better for this case?
No, using absolute lenght units like inches is a very bad idea on a monitor, becuse there is simply no wayfor you to know how large an "inch" will look like on someone elses screen (OS, monitor, resolution etc will affect this to a large degree).
However if you are trying to make a .CSS for how a page should look on a printed paper, cm and inches are very good measures.
While it doesn't work well in the "electronic world", on a printed paper an inch really IS an inch.By using font-sizes in % and keeping the page main content as size 100% and wroking with em or ex sizes where apropriate, you usually get a solution that works the best in most situations for your visitors.
It is difficult to achieve what you have said (for me at least). I am not quite sure when to use EM and EX since these vary with the user's default font size (like you have said). I have tried experimenting and found that because of this problem, it can be difficult to position things due to a change in font sizes. I would love to know how percentages for positioning can be used smoothly with EM/EX for font sizes.
Font sizes in percentage? An example please?Originally posted by Xeenslayer
It is difficult to achieve what you have said (for me at least). I am not quite sure when to use EM and EX since these vary with the user's default font size (like you have said). I have tried experimenting and found that because of this problem, it can be difficult to position things due to a change in font sizes.
Depends on how you build your page. Usually you should eg never position:absolute anything into an area where normal content "lives", only to outside margins.
If you do that positioning works just fine.
Eg
<body style="margin-left:10ex">
<div style="position:absolute; top:10px; left:2ex; width:6ex;"></div>
Font sizes in percentage? An example please?
font-size:100%
font-size:150%
font-size:75%
By default on windows font-size: 100% = 16px = 13pt
(Of cource pt should never be used on screen, it's just stated for comparative reasons.)So by giving font sizes a percentage, are we also giving it a fixed size?
eg.
font-size:50% = 8px;
font-size:150% = 24px?Originally posted by Xeenslayer
So by giving font sizes a percentage, are we also giving it a fixed size?
eg.
font-size:50% = 8px;
font-size:150% = 24px?
Yes, until the user changes the default fontsize of cource.
The important thing though is that the relative size between different sections will remain the same (eg something with font-size:50% will be 1/3rd the size of 150% even if eg the default usersize is 20px instead of 16px )I don't know a lot about ccs, javascript, or anything else for that matter.
But I've managed to put together a website that looks pretty much the way I want it to in my browser (I.E.) The javascripts I use are cut & paste, tho' I've managed to make a few changes so that they'll do what I need.
I know nothing about "objects", "methods," etc. The successful changes I've made in scripts are the result of a lot of guesswork and persistence!
I've asked questions on several different forums, and the answers I've received were usually 'way over my head...Here's my problem:
My site is dog related. Most of the people who visit don't even know as much as I do about screen resolutions, etc! They aren't going to make any changes in their settings to accomodate my site.
As more and more people are using larger monitors and higher resolutions, I would like to re-design my site so that it looks as good at higher resolutions as it does at 600 x 800.
I would think that using percentages rather than absolute sizes might be the answer. My site has a lot of images, and many pages have multiple slideshows in InLine Frames.
I don't even know where to start!
Would one of you mind taking a look at my site, and giving me some suggestions?
Here's a link:
Regardless Shorthairs (<!-- m --><a class="postlink" href="http://www.regardless-shorthairs.com">http://www.regardless-shorthairs.com</a><!-- m -->)Originally posted by Judy
I don't even know where to start!
Well I would start with fixing all the HTML errors so you have a firm base to stand on onto which you can apply your CSS and JavaScript.
Eg something like this will start you of in the right direction
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Script-Type" content="text/javascript">
<meta http-equiv="Content-Style-Type" content="text/css">
<title></title>
<style title="Default" media="screen" type="text/css">
body {background:black url(Xmas/Xmas_Page1.jpg) 50% 50% no-repeat;}
</style>
</head>
<body>
</body>
</html>
Also, as you add markup to your page you can do a basic check for if what you do is correct or not by visiting this page
<!-- m --><a class="postlink" href="http://validator.w3.org">http://validator.w3.org</a><!-- m -->