Probably in the header section? If someone had a quick answer, I would be in their debt. Crunch time, and my google-fu seems weak today.
Thanks.
Probably in the header section? If someone had a quick answer, I would be in their debt. Crunch time, and my google-fu seems weak today.
Thanks.
It’s not possible with HTML itself, only with Javascript:
http://www.cybertext.com.au/tips_HTML_window_size.htm
It’s not normally a good idea, though, many people suppress that function - me included.
If you want to center an object within the page, see
http://www.jakpsatweb.cz/css/css-vertical-center-solution.html
The thing is, it’s Wordpress, which I am not impressed with it all. My roomie is doing this for a client and I really just want to get to the point where we have that functionality in PHP mySql and be done with Wordpress which is a nightmare to work with. I will pass you ideas along. Thanks.
Why would you want to do this? It seems like you’re asking how to install a non-adjustable seat in a car when it’s already got a perfectly nice adjustable seat already installed.
I think the best* way to do this is to make a DIV element with fixed width and height, and place all your content inside it - that way, people will still be able to resize their browser windows (and it won’t just fail somehow if their browser can’t resize itself) - if they shrink it beyond the size of your content, they’ll have to scroll.
*‘Best’ is a relative term here - some people will probably still hate you for constraining the content in this way, but this will be less than they hate you (and from fewer people) if you try to resize their browser window.
Because Wordpress is a PITA, and it would be a temporary and expedient solution to a problem my roomie is having with formatting that looks like crap. Any other questions?
The quality of Wordpress isn’t my point. HTML is made to be able to stretch to fit the page or to be able to create a box that’s a fixed width that you can put your content in. Constraining or resizing the user’s browser just pisses the user off.
I understand this, but we are trying to make some cheese here, so this is why I asked.
Especially as the new size may ‘stick’ when the window is closed - if it was the only window open, some browsers will assume this is the new default window size - meaning that the size is imposed on the user’s subsequent browsing, not just the site’s own content. That’s quite a bad thing.
Even constraining the content inside the browser might cause problems for some people - if they have the text size turned way up because of a visual impairment, for example.
Yes? OK followup question:
Are you planning on using this knowledge?
No? Good, please don’t tell anyone how to do it, and let the knowledge die with you in due course.
Yes? The crucifixes are on the right, there’s bound to be one your size, so if you could just pick one out and go and see the friendly guys with the black hoods outside and tell them I sent you. Don’t worry, the excruciating pain of your death won’t last more than a week or two and the crowd of users are bound to get bored and stop jeering at you and poking you with sticks after a day. OK two at most.
I would be willing to be that whatever problem you’re having has nothing to do with Wordpress itself.
Man, I hate sites that do this. Why? Because your site is
NOT THE ONLY SITE I HAVE OPEN IN MY BROWSER!
I may have several dozen web pages open in different tabs. Then ONE site, one irredeemably rude site, decides it has to resize my browser and force every other site to follow.
No, I’ll never return to that asshole site. Ever.
To use another car analogy, it sounds like what the OP is asking for is the equivalent of smashing out your car’s window when you want it open, instead of simply rolling it down.
You don’t want to restrict the size of a browser window. Just use the tools HTML provides you and lock the relevant content into a DIV or frame (or hell, even a table if you must) of the appropriate size, as previous posters have described. Trying to change the size of the actual browser window is the “I don’t really understand how this world wide web thing works” approach.
This is kind of what I wanted to say (although perhaps less forcefully).
If the goal of creating the web content is to allow other people to access it, enjoy it and maybe share it with others, then resizing the browser window is counter-productive - because it will annoy and alienate a significant portion of the audience.
That’s not to say you should pander to everyone’s demands - there was a thread recently on whether it is acceptable to force links to open in a new tab/window - that one annoys and alienates people, but IMO, it’s a far less serious concern than resizing the browser - do that and people will hate you.
Some people will probably hate you enough to try to hack your site, or cause you some other kinds of problems.
Really? I get annoyed and alienated when a site doesn’t automatically open external links in new tabs. That’s what the tabs are there for. I usually don’t want to navigate off the site if I’m reading something and happen to follow a link embedded in the text. (Yeah I know you can always right-click to open in a new tab, I just wish it were the default)
You can also middle-click or ctrl-click.
Even though in my heart I agree with you on this one, it’s a fair argument that the choice should be up to the visitor, and not the designer, on whether they leave the site or not when they click a link.
As long as I still have that choice with Flash site buttons and JavaScript fly-out buttons, but they’re sometimes engineered where that’s not possible. For example, if I click on the “Search” link at the top of the page, where the dropdown includes a link to “Advanced Search” I find “ctrl-click” doesn’t open it in a new tab, whereas right-clicking and choosing from the menu does.
Opinion is quite sharply divided on this on, but on balance I feel it’s at worst a lesser sin than resizing the browser.
Here’s the previous thread I mentioned:
Okay, am I the only one confused by this reference? Is ‘making cheese’ an idiom that I haven’t come across before? Because literally making cheese has nothing to do with the size of a browser window or HTML as far as I know.
Me too. If you’re using firefox, check the advanced javascript settings and disable all of them. Problem solved.