Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disallowing changing of text size in HTML 1

Status
Not open for further replies.

IceThor

Programmer
Sep 10, 2002
13
0
0
US
Hello, I'm doing a very tight-knit page with a load of tables and I need to know if I can force the same text size regardless of what someone has selected in their browser. (Example, the page looks fine when IE's text size is set to the standard medium, but it gets out of format when it is set to large)

Thanks for any help! -Trevor
 
Hi,

Use this to do what you want:

<STYLE TYPE=&quot;text/css&quot;>
.textcontent
{
COLOR: #000000;
FONT-FAMILY: Arial;
FONT-SIZE: 13px;
FONT-WEIGHT: none;
}
</STYLE>
<SPAN CLASS=&quot;textcontent&quot;>TEXT AT SIZE 13PX FIXED SIZE</SPAN>

I do this on my site (sig below)

Hope this helps!
greenjumpy.gif
NATE
design@spyderix-designz.com
 
This is highly not recommended to do as was discussed many times here.
Not allowing your user to change the text size is one of the most unseemly things one can do.
Let your visitors decide how large the text should be.
If it breaks your layout - change it!
 
Hi Trevor,

Actually I think the user can ALWAYS override whatever you speficy, it doesn't matter if you specify font size, color or family a user can easily change these.
But don't worry cos the majourity of people don't!
Also, try to allow some flexibility in your design!


É

- :: my FIRST site in XHTML, comments/ criticism/ questions much appreciated!! :)
-
 
your solution is to not use tables for layout. i know its a bit difficult at first. i became a master of building tables that made the most complex layout look awesome, but its just plain bad code. seperate the content from the layout by using CSS for all your layout and formatting and the page will look good on everything. even text-browsers and peoples phones.
 
Hi dudes, thanks for your input. But I'm currently in the middle of making a website for some friends and it's set up like a storybook. Now normally every page I work on -- the one in my sig not being normal, that's a temporary one, ignore that! -- the layout is 100% flexable, but I've never done anything like this before.

Perhaps checking it out would explain it more -- the temporary upload spot is on my webspace:


So, again, it's a work-in-progress and some images are going to get changed and what not.

I'm still(and always) learning CSS, but not using tables? That just sounds absurd to me! I would take a bullet for a table!(no pun intended) I'd breast feed a table and raise it as my own if I could! And besides, anyone viewing a webpage &quot;on their phone&quot; deserves to be smacked.

I'm sorry, I've strayed so far away from the subject.

Oh yes, do you see where I'm going with this page and why I don't want the text size to change? I want it the same on every computer -- forced by me and no way to change it. (Perhaps it will help me get a job at Microsoft!)

Thanks! -Trevor
 
>>Oh yes, do you see where I'm going with this page and why I don't want the text size to change? I want it the same on every computer -- forced by me and no way to change it.

What you do is pleasing your ego at the expense of your visitors. The real professional always think about their user's feedback and tries to make his work be easy and comfortable for them.
You make webpages for visitors, not for yourself!

You want to make it looking the same everywhere? Well, a good target. But the aims you use (and not only you, unfortunately) for this are very bad.
By the way, it is possible to achive what you want using CSS - and this is the right way to do this.

 
Hi Trevor.

Wow, excellent little site! Really like it!

Just try to build it as flexible as possible and there should be little problem.
And remember users with eye sight problems may want large font sizes and its not fair to discriminate against them!

You could try putting the content in a div, clip the size to the limit you want and then any overflow of text could be scrolled or hidden. not perfect but maybe 1 option!

Also, I view webpages with a phone quite regularly! U wanna take a swing at me?? haha LOL

And as Starway said, CSS IS the right way to do it and should be no problem in this case.


É

- :: my FIRST site in XHTML, comments/ criticism/ questions much appreciated!! :)
-
 
You could always save all your text as a graphic....

:)

Like the site...

Are you sure that you *have* to fix the text size? There are benefits for the design, but you are going to have to create a new page every time the text runs over - you might end up with your readers having to click on a link in order to get to read the last five words of a story...

The book metaphor is a metaphor - don't be trapped by it.

Duncan --
Dunx
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top