I am trying to design a webpage but no matter how i design it, IE seems to show totally different design then firefox/chrome/safari.

Is there any website i can goto which will take my CSS/Script input and give me the IE version of it so it can work on all browsers without any issue?

Thanx

Kor

07-27-2011, 04:24 PM

You should code standard and, in case there are some differences, you must use a workaround. There is no such a tool. You must simply learn how to code in a standard html/CSS/JavaScript manner and learn the differences (which are not so many) between the browsers.

By the way: which IE? There are 3 versions in use: IE7,8, and 9. IE10 is on the way, and IE6 has to be ignored. IE7 and IE8 are not so different, and IE9 looks very close to FF and Chrome. Thus it remains, probably IE8 :)

SiKni8

07-27-2011, 04:34 PM

You should code standard and, in case there are some differences, you must use a workaround. There is no such a tool. You must simply learn how to code in a standard html/CSS/JavaScript manner and learn the differences (which are not so many) between the browsers.

By the way: which IE? There are 3 versions in use: IE7,8, and 9. IE10 is on the way, and IE6 has to be ignored. IE7 and IE8 are not so different, and IE9 looks very close to FF and Chrome. Thus it remains, probably IE8 :)

I am using verzion 7 and i have also FF and Chrome. and alot of the coding for example here (www.sikni8.com/swav/index.htm) i see one way in ff and one way in IE( notice how the menu extends out in IE but invisible). Kind of like that issues...

Thanx

Kor

07-27-2011, 05:02 PM

You should have not used a TABLE. You may use DIVs and CSS to float the elements.

Some HTML attributes you have used are deprecated (or even illegal under the type of Doctype you have used, aka: HTML5), like topMargin, bgColor, cellSpacing, cellPadding... You must use CSS all over for the layout.

CSS: before anything else, give your elements margins and padding 0, That will prevent a default margin/padding which some old browsers will automatically insert

// Now we have to add these divs to the content div in the document body
contentDiv.appendChild(mapContainer);
//contentDiv.appendChild(controlContainer); //not needed as the contents will be displayed elsewhere on the page

tDiv.appendChild(controlContainer); //add it to a different DIV of the BODY of HTML

// Create a SearcherOptions object to ensure we can see all results
var options = new google.search.SearcherOptions(); // create the object
options.setExpandMode(google.search.SearchControl.EXPAND_MODE_OPEN);

// Add the searcher to the SearchControl
searchControl.addSearcher(searcher , options);

// And second, we need is a search complete callback!
searchControl.setSearchCompleteCallback(searcher , function() {
map.clearOverlays();
var results = searcher.results; // Grab the results array
// We loop through to get the points
for (var i = 0; i < results.length; i++) {
var result = results[i]; // Get the specific result
var markerLatLng = new google.maps.LatLng(parseFloat(result.lat),
parseFloat(result.lng));
var marker = new google.maps.Marker(markerLatLng); // Create the marker

// Bind information for the infoWindow aka the map marker popup
marker.bindInfoWindow(result.html.cloneNode(true));
result.marker = marker; // bind the marker to the result
map.addOverlay(marker); // add the marker to the map

// Set the new center of the map
// parseFloat converts the lat/lng from a string to a float, which is what
// the LatLng constructor takes.
map.setCenter(new google.maps.LatLng(parseFloat(center.lat),
parseFloat(center.lng)),
zoom);
});

// Check for geolocation support
if (navigator.geolocation) {
// Use method getCurrentPosition to get coordinates
navigator.geolocation.getCurrentPosition(function (position) {
// Access them accordingly

alert(position.coords.latitude + ", " + position.coords.longitude);

});
}

// Draw the control
searchControl.draw(controlContainer);

// Set the map's center point and finish!
map.setCenter(new google.maps.LatLng(40.56995 , -74.006989), 16);

Two things with this script...
1st I would like to map to auto center on the user's current location and drop a custom marker on it.
2nd I would like the search querie to find nearby restaurant, lets say, from the current location.

As you can see I can get the current location but how would i incorporate it in the script to function properly?