News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

same size in all browsers?

Started by tHe-KiLlEr, November 15, 2010, 03:37:54 PM

Previous topic - Next topic

tHe-KiLlEr

hey guys how do i make my website to have same size in all browsers? and i am using smf rc3!! ;)

mashby

Force all of your users to use the same browser. Not realistic? I would concur. The next step is to have all browsers adhere to the W3C standards. Not realistic? I would concur. IE is the biggest violator of the W3C standards and yet they are on the board/membership.

So, given all of that, what do you really mean by "same size"?
Always be a little kinder than necessary.
- James M. Barrie

MrPhil

You want a "fixed width" layout? I'm sure that with a little twiddling of the style sheet (.css) you could do that. As mentioned, there may be some slight variance among browsers, but if you declare fixed widths, you should come out pretty close in size. For a given page (fixed content), the height should therefore be fairly consistent.

What is the point of a fixed width layout, as opposed to something more "fluid"? Do you really want to irritate users with wide screens (and browser windows) by leaving a big unused chunk to the right of your forum (or floating a fixed width of content between two huge unused gutters)? How about users on mobile devices and smaller screens, where they'll be forced to scroll their page left and right to read the whole thing? If you're putting out an elaborate custom theme, perhaps with a large untiled image for the background, maybe a fixed width would be appropriate, but most of the time it's not. A fluid layout that expands to fit the browser window, with possibly a max-width setting for each column of text (so a line doesn't become too long to comfortably read) and a min-width setting (so it's not ridiculously short lines), is usually best, unless your design is working around an image background.

Screen real estate is precious. I hate layouts that leave large amounts of unused space at left and/or right. My monitor is only 1024 wide, so it would be nice to use up more space horizontally. As I mentioned before, the problem with a purely fluid layout is that you don't want lines of text to become so long that they're uncomfortable to read. I wonder if anyone has found a reliable way to query your screen (browser window) size and do a vertical layout for narrower windows and a multicolumn horizontal layout for wide windows? Unfortunately, dividing up content into two or more columns (like a book or magazine) is difficult to do with HTML, and requires additional vertical scrolling (reach the bottom of the left column, go all the way back to the top for the right column). Dividing content up into multicolumn chunks (all of both columns is on-screen, then scroll down for the next pair of columns) would be quite readable, but I don't think it's easily done (anything in HTML 5?). It's hard to tell how much space a given sequence of characters is going to take up, so you can't simply count how many characters there are (unless you're using a fixed-pitch font). Publishing systems such as LaTeX make a great effort to know just how large some text is, so it can be wrapped at the right point, but on the Web you normally just throw text at a browser and let it figure out where to wrap lines, given a particular font in use.

Advertisement: