lAZLf Posted May 4, 2010 Share Posted May 4, 2010 So for my website I have one style attribute for a div that changes whether or not the user is using ie or something else #dropdown { display:inline-block; margin:0px; width:110px; *display: inline; } the * means it will only work in ie. So that fine, but now i need to be able to do that, change it if its in ie, through javascript. how would i do that? something like this? document.getElementByID(id).style.XXXXXXXXXXXXXXXX? Quote Link to comment Share on other sites More sharing options...
roopurt18 Posted May 4, 2010 Share Posted May 4, 2010 Why do you have to do this with JavaScript? Why not use the IE comment-hacks to include a small CSS file with changes for IE? Or why not define a special class in your CSS with these attributes and just add or remove the class to the div element with JavaScript? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.