Relative font-size

windows

Guest
Hey folx,<br />
<br />
I'm trying to get the syntax right to use "font-size" as relative so that my text will re-size along with a window size... I've tried:<br />
<br />
<font-size:50%>Text</font><br />
<br />
<br />
Any suggestions would be helpful. Okham<!--content-->You need to go back to the basics:<br />
<!-- m --><a class="postlink" href="http://www.w3.org/TR/1999/REC-html401-19991224">http://www.w3.org/TR/1999/REC-html401-19991224</a><!-- m --><br />
<!-- m --><a class="postlink" href="http://www.w3.org/TR/CSS21">http://www.w3.org/TR/CSS21</a><!-- m --><!--content-->Thanx for the suggestion, Vladdy. I looked at the site, but didn't find what I was looking for. Any other suggestions?<!--content-->Takes more than "just looking". Read through. Learn. Try. Understand.<!--content-->Hello there.<br />
<br />
I am against <font></font> tags but i think this is what you need anyway. <br />
<br />
<span style="font-size: 50%">Text goes here</span> <br />
<br />
Try it out, tell me if it doesn't work. I am not very sure about the font-size attribute. <br />
<br />
Best Wishes, <br />
David<!--content-->Hey David,<br />
<br />
Thanx for the suggestion. I tried the option, but it didn't work. - -I've been trying to create as fluid a webpage as I can, but I'm finding there are many limitations to doing that as opposed to creating a static one. I've used layers and graphics, but I'm finding that the absolute positioning shifts the images around during resizing, and images in tables won't resize on the fly. Feel free to make any more suggestions, as of yet I haven't found any solutions for making my webpage more fluid.<!--content-->Take a look here: <!-- m --><a class="postlink" href="http://www.style-sheets.com/tutorials/font/index.asp#font-size">http://www.style-sheets.com/tutorials/f ... #font-size</a><!-- m --> <br />
<br />
I think you want <span style="font-size:large">text here</span><!--content-->Thanx for the link, Aronya. I've read several, but have found them confusing as far as the use of the syntax; for instance, if I had a simple line of text in html such as:<br />
<br />
<font style="font-size:80%">Text</font><br />
<br />
This doesn't adjust the text relative to the size of the window, it remains the same size. Most have read something like: H1 {font-size:80%}, but does this mean this is something that has to be treated in a javascript?<!--content-->I believe % will adjust relative to the parent font, not the window size. Try the more general terms: small, large, etc.<!--content-->Good idea Aronya. Alternatively, you could use variables such as px and em. <br />
<br />
Best Wishes, <br />
David<!--content-->What you can do is specify the width's of elements in the unit "ex" and specify the font sizes in either "%" or "em". That way you should keep the same number of words to a line no matter what the users default font size is.<br />
<br />
Coding either a very fluid or very fixed layout in CSS takes practice. Fluid layouts need to be flexible but keep their structure at the same time. Fixed layouts need to be almost pixel perfect in each browser, and with browsers like IE around that's not an easy task.<br />
<br />
Without seeing code I cannot help further, but I suggest that you think very simple, try to minimise the number to tags that you use, stay away from tables and get your structure done before you start worrying about the looks.<!--content-->Thanx for the info, lavalamp. These forums have continually been a great source for me to find answers to my questions. I think that until I can make some practical use of the tags you mentioned, I'll have to find some other alternatives for my project. I can see why you say stay away from tables when considering a fluid page, though at the moment they tend to be a practical way for me to keep my page organized as I'm not especially fluent in other options. I'll continue to post, this is a great resource.<!--content-->
 
Back
Top