Jump to content

Recommended Posts

http://www.letswoosh.com/events.php?req=category&cat_id=1

 

In firefox it works pretty well; but in IE 6 when i make the page smaller the center and right columns fall beneath the left column... also is there a way to extend the left and right columns with height to 100%? I hate having that extra white space.

 

THANKS!!

Link to comment
https://forums.phpfreaks.com/topic/76467-solved-liquid-layout-issues-with-ie-60/
Share on other sites

Try some Javascript.

 

matchColumns=function(){
var divs,contDivs,maxHeight,divHeight,d
divs=document.getElementsByTagName('div')
contDivs=[]
maxHeight=0
for(var i=0;i<divs.length;i++){
if(/\bcolumn\b/.test(divs[i].className)){
d=divs[i]
contDivs[contDivs.length]=d
if(d.offsetHeight){
divHeight=d.offsetHeight}
else if(d.style.pixelHeight){
divHeight=d.style.pixelHeight}
maxHeight=Math.max(maxHeight,divHeight)}}
for(var i=0;i<contDivs.length;i++){
contDivs[i].style.height=maxHeight+"px"}}
window.onload=function(){
if(document.getElementsByTagName){
matchColumns()}}

 

Give the divs a class of column then the shortest will stretch to be as long as the longest.

Yeah it is, a lot of people will tell you that you shouldn't rely on Javascript for something like this but it all comes down to the type of site you are developing/running and the types of visitors you get.

 

All of my visitors have Javascript which means I can design my site to rely on it.

 

But yeah it is a handy script, if you use jQuery I have another version of that but wrote to utilize the jQuery library (as such it's smaller and executes sooner etc.).

That is cool. My site is for the general public, but from my experience most of the general public has javascript enabled whether they know that or not. Mostly i think that is because of flash, which now has reached about 95% of computers. I think 5 years ago i'd be hesitant about javascript but not anymore.

That is a big assumption to make. Roughly 6% - 13% of internet users have Javascript disabled. You are more likely to find that tech-savvy users have it disabled, especially if they use firefox (using the firefox addon "NoScript"), and some large companies have javascript disabled on all their computers as a default. Some "special demographics" will also have js disabled. It is an accessibility issue.

 

I used to work at a travel company that used a lot of javascript on their site. The whole site was overhauled to work without javascript because they realised that it was preventing a lot of people from making purchases and that googlebot was not correctly indexing their site because it could not read their javascript menu.

 

You should check you analytics or subscribe to advanced usability analysers to see what is going on with your site. But generally, you should always build your site to work without javascript, and javascript should only enhance the user experience. This is also why the rise of DOM scripting, with behaviour separated from markup in a similar way to how styles are, is becoming ever more requested. Any well designed flash site (which should use js to "embed" flash) will also have an html/css alternative for users with js disabled.

 

Javascript just to get equal column lengths is maybe an "enhancement" that won't matter if users have js disabled, but it is also a bit lazy because they are a couple of css-based methods to achieve the same result. Up to you really, but don't assume that it is fine to expect people to have js enabled.

Well you are right, in a way. But this is 2007. I realize big companies and corporations will probably have it disabled, their employees shouldn't be browsing the Internet while at work anyway most of the time. The fact of the matter, at least from where I'm standing, is that these days if you don't have Javascript enabled: you're missing out on a lot of fun. A lot of big (and small) sites use it to do extremely cool things. Your loss.

 

There's no reason to have it disabled these days unless you are required to (company, paranoid parents etc.) or you don't even know it is there or how/why to enable it.

 

Other than that I really can't think of any good reasons to not have it disabled.

The fact of the matter, at least from where I'm standing, is that these days if you don't have Javascript enabled: you're missing out on a lot of fun. A lot of big (and small) sites use it to do extremely cool things. Your loss....

...There's no reason to have it disabled these days unless you are required to (company, paranoid parents etc.) or you don't even know it is there or how/why to enable it.

 

Whoa. First, if YOU are making a site for "Fun", entertainment or even just personal use, and don't care how many visitors may not be able to view the site, then do whatever you want.

 

But if you create sites for any type of business or e-commerce, that actually relys upon at least in part their website, then you DON'Twant to lose ANY potential visitor if avoidable.

 

Never assume why someone does something for security on their computer. Once you see how easy it is to take over a site, hack a server or hijack forms using jscript (simply by typing it in the location bar) you understand its potential power for evil. And a large percentage of the millions of people who DID get burnt by jscript, at one time or another over the past 12 years or so, DO turn it off.

 

Up until two years ago, many web creators ignored any web browser other than IE. The rationale was similar to your jscript rationale ... "Most people only use IE anyway, so why bother with the 10% or so people with other browsers." (and believe it or not, there are still millions of people who think IE is the only browser that matters). But, now, it is absolutely foolish to craft a website for IE only since @ 30% of visitors now don't use it. 30%! Between FF and safari alone my server stats show 28%

 

Never make something as crucial as your site layout rely on jscript. You are better off writing a seperate css just for IE.

But this is 2007.

 

Which is why the current wisdom is that you should not make it necessary for your visitors to have js enabled.

 

- JS is still a security risk which is why many people, and companies, have js disabled.

- A site is not indexed properly by major search engines if it has content or links called in by a script.

- There are legal issues related to accessibility that need to be considered by companies with a web presence.

 

Increasing numbers of people use things like the Firefox extension "NoScript" - that means a site has to actively convince a visitor to enable js. People with disabilities may also be browsing with js off.

 

It doesn't matter what we think about browsing with js-off or what the explanation is...only that people are doing it and it is in your interest to cater for them. Obviously if your stats show only 0.01% of visitors have js disabled then it isn't a big concern! But when you've worked on a business site that is losing 10% of potential customers because you have nothing that caters for their browsing habits, then it's a whole different story.

 

The internet isn't about doing "cool things". It is about effectively communicating with other human beings! The "cool things" can be a progressive enhancement for those that wish to experience it but shouldn't be a requirement for viewing the information.

I wasn't saying that the Internet/Javascript is for doing cool things, I was just using that as an example. Look at Facebook, Digg etc. yes I realize you can use them without Javascript which I do agree is a good thing but they use JS to do some really cool things.

 

I actually do try to cater for people who don't have it enabled, despite most of my visitors have it enabled. I was just saying that maybe some people should move on... or people who use Javascript should be careful with it as to avoid potential security problems.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.