 |
Account Login
|
 |
 |
Latest Articles
|
 |
 |
IRC Channel
|
 |
 |
Associates
|
 |
 |
Associates
|
 |
|
 |
 |
|
 |
03-12-2008, 08:28 PM
|
#1 (permalink)
|
|
The Acquainted
Join Date: Feb 2008
Posts: 119
Thanks: 17
|
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.
|
|
|
|
03-12-2008, 09:06 PM
|
#2 (permalink)
|
|
The Contributor
Join Date: Jan 2008
Location: Brazil
Posts: 77
Thanks: 14
|
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.
|
|
|
|
The Following User Says Thank You to DeMo For This Useful Post:
|
|
03-12-2008, 09:39 PM
|
#3 (permalink)
|
|
The Acquainted
Join Date: Feb 2008
Posts: 119
Thanks: 17
|
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
|
|
|
|
03-13-2008, 09:07 AM
|
#4 (permalink)
|
|
The Acquainted
Join Date: Jan 2008
Posts: 136
Thanks: 4
|
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
|
|
|
|
03-14-2008, 10:58 PM
|
#5 (permalink)
|
|
The Frequenter
Join Date: Dec 2007
Location: In my basement
Posts: 386
Thanks: 47
|
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?
|
|
|
03-14-2008, 11:22 PM
|
#6 (permalink)
|
|
The Acquainted
Join Date: Feb 2008
Posts: 119
Thanks: 17
|
Quote:
Originally Posted by Aaron
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?
|
|
|
|
03-18-2008, 06:10 PM
|
#7 (permalink)
|
|
The Acquainted
Join Date: Nov 2007
Posts: 166
Thanks: 0
|
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
|
|
|
|
03-18-2008, 06:14 PM
|
#8 (permalink)
|
|
The Acquainted
Join Date: Feb 2008
Posts: 119
Thanks: 17
|
of course I don't put everything in a div directly.
|
|
|
|
03-20-2008, 02:45 AM
|
#9 (permalink)
|
|
The Frequenter
Join Date: Dec 2007
Location: In my basement
Posts: 386
Thanks: 47
|
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 ;)
|
|
|
03-20-2008, 03:02 AM
|
#10 (permalink)
|
|
Moderateur
Join Date: Apr 2007
Posts: 1,393
Thanks: 5
|
Quote:
Originally Posted by Aaron
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. 
|
|
|
|
03-20-2008, 11:28 AM
|
#11 (permalink)
|
|
The Frequenter
Join Date: Dec 2007
Location: In my basement
Posts: 386
Thanks: 47
|
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.
|
|
|
03-20-2008, 01:20 PM
|
#12 (permalink)
|
|
Moderateur
Join Date: Apr 2007
Posts: 1,393
Thanks: 5
|
Quote:
Originally Posted by Aaron
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.
|
|
|
|
03-20-2008, 08:56 PM
|
#13 (permalink)
|
|
The Frequenter
Join Date: Dec 2007
Location: In my basement
Posts: 386
Thanks: 47
|
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.
|
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|