New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
Web Design and Hosting Creating sites, scripting, and hosting discussions.

javascript detect & CSS.


Post Reply New Thread Subscribe

 
Thread Tools
design2
Guest
 
Posts: n/a

basically ive had problems using divs instead of tables working in most common browsers and platforms, but i refuse to be beaten and believe my best bet now is to detect on index page which platform/browser and then use the desired css file.

I only have 2. ie.css and mozilla.css which i think should cover most.
So i tried using this http://techpatterns.com/downloads/sc..._detection.txt

but when i type in the header code
<link rel = "stylesheet" type = "text/css" href = "css/main.css" />
<script type = "text/javascript" src = "/js/browser_detection.js"> </script>
<script type = "text/javascript>browser_css( ); </script>
</head>

it messes up cos the "text/javascript>browser_css( ); doesnt seem to be closed. so i made a file and have checked the file names and that the directories are right but still no go it is not picking up different css files just using the default main.css

if anyone has time or has done this before can u post the code i put in the head and the code i need in the file.js ? thanks.
QUOTE Thanks
design2
Guest
 
Posts: n/a

if anyone is interested to use divs instead of tables and maintain browser compatability use javascript detectection which chooses 2 css files that u create, a IE one and mozilla one.

theres a basic, easy tutorial at http://www.andreas.com/faq-css-detect.html
QUOTE Thanks
muso

 
muso's Avatar
 
Member Since: Jan 15, 2003
Location: Whangarei, New Zealand
Posts: 2
muso has a reputation beyond reputemuso has a reputation beyond reputemuso has a reputation beyond reputemuso has a reputation beyond reputemuso has a reputation beyond reputemuso has a reputation beyond reputemuso has a reputation beyond reputemuso has a reputation beyond reputemuso has a reputation beyond reputemuso has a reputation beyond reputemuso has a reputation beyond repute
Mac Specs: Pwnt

muso is offline
You might like to have a look at this site design2 - http://www.alistapart.com, in particular this article - http://www.alistapart.com/articles/bodyswitchers/

I'm in your forums, writing sentences in a grammatically acceptable manner.
QUOTE Thanks
design2
Guest
 
Posts: n/a

thanks muso.
thats a good read & resource.
QUOTE Thanks
JackTheRipper

 
Member Since: Dec 11, 2004
Location: Vancouver
Posts: 128
JackTheRipper is on a distinguished road
Mac Specs: 14" iBook 1.33 G4, 768 MB RAM, 60GB HD

JackTheRipper is offline
Hey,

you might also wanna check this link out:

http://www.pmob.co.uk/temp/3colfixedtest_4.htm

set css templates that are pretty much consistent in a lot of browsers [dunno if all of them are]

JTR
QUOTE Thanks

Post Reply New Thread Subscribe


« Flash browser plugin on MAC | Ip Tracking »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Javascript and Safari (earlier versions) noodles Web Design and Hosting 0 02-17-2005 02:46 PM
My first tableless CSS layout ChicoWeb Web Design and Hosting 17 01-18-2005 02:57 PM
Javascript and Frames problem in Safari HarrySpier Web Design and Hosting 3 11-09-2004 04:47 PM
Quicktime and callbacks in javascript ivy2 Web Design and Hosting 0 08-06-2004 06:32 AM
CSS strangeness in Safari only!? stevenjohn Web Design and Hosting 1 03-29-2004 07:08 AM

All times are GMT -4. The time now is 06:50 AM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?