TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 03-12-2008, 08:28 PM   #1 (permalink)
The Acquainted
 
freenity's Avatar
 
Join Date: Feb 2008
Posts: 119
Thanks: 17
freenity is on a distinguished road
Smile FF text size

Hi
I always use my Firefox with text size a bit zoomed, and I was wondering if there is any way to bypass this, because now I'm developing a wordpress theme and when I see it in ff (with zoomed text) it looks aweful, so I just reduce it a bit to a normal size and it looks fine.
Is there any technique to bypass this??

p.s. the theme of course uses css...

Thanks.
__________________
http://feudal-times.net - My PBB Game
http://gwphp.feudal-times.net - My Blog "Gaming With PHP"
freenity is offline  
Reply With Quote
Old 03-12-2008, 09:06 PM   #2 (permalink)
The Contributor
 
DeMo's Avatar
 
Join Date: Jan 2008
Location: Brazil
Posts: 77
Thanks: 14
DeMo is on a distinguished road
Default

You mean preventing the user from zooming in/out your page? If that is case then I guess there's no way to do it, the zoom is a user-controlled feature of the browser, we can't manipulate it via CSS or JavaScript.

You can, however, create a JavaScript system that increases/decreases font size on the fly. Take a look here for an example, you're gonna see 4 letter A's, clicking them will change the font-size of the article. I don't know Wordpress but there's probably a plugin out there to add this feature.
Send a message via ICQ to DeMo Send a message via MSN to DeMo Send a message via Skype™ to DeMo
DeMo is offline  
Reply With Quote
The Following User Says Thank You to DeMo For This Useful Post:
freenity (03-12-2008)
Old 03-12-2008, 09:39 PM   #3 (permalink)
The Acquainted
 
freenity's Avatar
 
Join Date: Feb 2008
Posts: 119
Thanks: 17
freenity is on a distinguished road
Default

thanks.
This feature is used in phpbb3 also.

What I want to do is make it zoom friendly. So when a user zooms it, it doesn't look so bad
__________________
http://feudal-times.net - My PBB Game
http://gwphp.feudal-times.net - My Blog "Gaming With PHP"
freenity is offline  
Reply With Quote
Old 03-13-2008, 09:07 AM   #4 (permalink)
The Acquainted
 
Gareth's Avatar
 
Join Date: Jan 2008
Posts: 136
Thanks: 4
Gareth is on a distinguished road
Default

To make sites zoomable I think you would have to make everything use a percentage value for their size. e.g.

Code:
.blah{
     width: 75%;
     font-size: 1.2 em;
Gareth
Gareth is offline  
Reply With Quote
Old 03-14-2008, 10:58 PM   #5 (permalink)
The Frequenter
 
Join Date: Dec 2007
Location: In my basement
Posts: 386
Thanks: 47
Aaron is on a distinguished road
Default

Normally, you use EM or PT for font sizes. To make them not scroll, use PX.

If you want to code everything well, you want to make everything work at any size. All of my sites work on both super small screens and super large screens. Most of the time using a % is the best way to go, unless if you want a specific value, such as the width of an image.

And while you are at it, try not to use div's at all. Scary thought, huh?
Send a message via MSN to Aaron
Aaron is offline  
Reply With Quote
Old 03-14-2008, 11:22 PM   #6 (permalink)
The Acquainted
 
freenity's Avatar
 
Join Date: Feb 2008
Posts: 119
Thanks: 17
freenity is on a distinguished road
Default

Quote:
Originally Posted by Aaron View Post
Normally, you use EM or PT for font sizes. To make them not scroll, use PX.

If you want to code everything well, you want to make everything work at any size. All of my sites work on both super small screens and super large screens. Most of the time using a % is the best way to go, unless if you want a specific value, such as the width of an image.

And while you are at it, try not to use div's at all. Scary thought, huh?
:\ what do you mean not using divs ???
What should I use then?
__________________
http://feudal-times.net - My PBB Game
http://gwphp.feudal-times.net - My Blog "Gaming With PHP"
freenity is offline  
Reply With Quote
Old 03-18-2008, 06:10 PM   #7 (permalink)
The Acquainted
 
wGEric's Avatar
 
Join Date: Nov 2007
Posts: 166
Thanks: 0
wGEric is on a distinguished road
Default

He means make your code schematically correct. So titles use h1, h2, etc. Paragraphs use p. Don't throw everything in a div with a class or whatever.
__________________
Eric
wGEric is offline  
Reply With Quote
Old 03-18-2008, 06:14 PM   #8 (permalink)
The Acquainted
 
freenity's Avatar
 
Join Date: Feb 2008
Posts: 119
Thanks: 17
freenity is on a distinguished road
Default

of course I don't put everything in a div directly.
__________________
http://feudal-times.net - My PBB Game
http://gwphp.feudal-times.net - My Blog "Gaming With PHP"
freenity is offline  
Reply With Quote
Old 03-20-2008, 02:45 AM   #9 (permalink)
The Frequenter
 
Join Date: Dec 2007
Location: In my basement
Posts: 386
Thanks: 47
Aaron is on a distinguished road
Default

I was actually being sarcastic. It was more of a challenge than anything; try to make a working web page without using a single div.

Semantically correct code is the next best thing though ;)
Send a message via MSN to Aaron
Aaron is offline  
Reply With Quote
Old 03-20-2008, 03:02 AM   #10 (permalink)
Moderateur
RegEx Guru PHP Guru Top Contributor Advanced Programmer 
 
Salathe's Avatar
 
Join Date: Apr 2007
Posts: 1,393
Thanks: 5
Salathe is on a distinguished road
Default

Quote:
Originally Posted by Aaron View Post
Semantically correct code is the next best thing though ;)
You appear to be implying that using DIVs is somehow not semantic. That's a general statement to make and on the face of it is completely wrong. There is no reason why the HTML markup cannot be both entirely semantically written and include DIV elements. So long as they're used for their intended purpose (hmm, what does DIV mean...) then it's a-ok to use them. That said, there's no reason why using DIVs should come as any particular requirement when writing a HTML document.

In contrast, I think we all know not to use:
HTML Code:
<div class="article_wrapper">
    <div class="title">My Article</div>
    <div class="paragraph">This is my cool little article</div>
</div>
... or maybe not.
Salathe is offline  
Reply With Quote
Old 03-20-2008, 11:28 AM   #11 (permalink)
The Frequenter
 
Join Date: Dec 2007
Location: In my basement
Posts: 386
Thanks: 47
Aaron is on a distinguished road
Default

Divs used correctly name elements. So their intended purpose is to provide a block level <span>. such as below:
HTML Code:
<div id="HomeFooter">
  <ul>
    <li><a href="#">Footer Text</a></li>
  </ul>
</div>
In here I am naming the footer, but don't think that I am naming it just because I use ID.

Id is used for elements that are used once in the page; logoStrip, leftColumnContent, footerLinks, ect. are all things that need ID's.

Classes are for elements that are used more than once, so on this forum each post can have its own css class.

[/rant]

My post above was just saying that coding semantically correct is hard for some people. the code block you illustrated proves it. IPB Board uses too many Div's as well. Coding without <div>'s, however, looks like an impossible feat to many people. I just made a fun little navigation with that is just a list and a LOT of css :/. I even had to take a shortcut and put <br /> tags before the link text to move it down.

mew mew

if anyone can help me out on the navigation to remove the break tags I would be grateful.

And, Freenity, sorry for hijacking.
edit:
Read more: The global structure of an HTML document

Last edited by Aaron : 03-20-2008 at 08:53 PM.
Send a message via MSN to Aaron
Aaron is offline  
Reply With Quote
Old 03-20-2008, 01:20 PM   #12 (permalink)
Moderateur
RegEx Guru PHP Guru Top Contributor Advanced Programmer 
 
Salathe's Avatar
 
Join Date: Apr 2007
Posts: 1,393
Thanks: 5
Salathe is on a distinguished road
Default

Quote:
Originally Posted by Aaron View Post
HTML Code:
<div id="HomeFooter">
  <ul>
    <li><a href="#">Footer Text</a></li>
  </ul>
</div>
Why not any of the following?

HTML Code:
<!-- *far* more concise than your html -->
<p id="footer"><a href="..." title="...">Footer Text</a></p>

<!-- oh, so you did want a list? -->
<ul id="footer">
    <li><a href="..." title="...">Footer Text</a></li>
    <li><a href="..." title="...">Footer Text</a></li>
</ul>
I know you were just giving an example, but it's always nice to give useful, reasoned examples. Notice the title attribute for all links, I think that was an important omission in your example, since we're on the subject of giving elements meaning.

Quote:
Divs used correctly name elements. So their intended purpose is to provide a block level <span>
Um, no that's not it at all. The DIV element is there to DIVide a document into a sub-section. A DIV used correctly defines a discrete section of the document, with or without a name or some form of labelling/hook for CSS styles to reference.

The fact that browsers display a DIV at a block level is merely convention (it makes sense) but a DIV can quite happily be used inline or floated and still have good semantic value -- the DIV is dividing up the document, regardless of how the document is presented. A SPAN is something entirely different, and its meaning is easy to understand; just read the tag literally and you've got it.
Salathe is offline  
Reply With Quote
Old 03-20-2008, 08:56 PM   #13 (permalink)
The Frequenter
 
Join Date: Dec 2007
Location: In my basement
Posts: 386
Thanks: 47
Aaron is on a distinguished road
Default

Quote:
The DIV and SPAN elements, in conjunction with the id and class attributes, offer a generic mechanism for adding structure to documents. These elements define content to be inline (SPAN) or block-level (DIV)...
The global structure of an HTML document

The way that you phrased it is right, but <div>s displaying at block level isn't just convention.
Send a message via MSN to Aaron
Aaron is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 11:10 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design