Jump to content

font family not effective after adding javascript code in IE browser


genzedu777

Recommended Posts

Hi all,

 

I realised after adding a javascript code and a tag <div class=district_1>, my font-family for NORTH DISTRICT is different from what I have set in #container, hence I decided to write another CSS code specifically for <div class=district_1> with a font-size and font-family, however it does not work, it only changes the font-size but not the font-family. I have attached an example for your reference

 

I realised it happens only in IE browser. Chrome, Safari and Firefox are doing well. Any advice with regards to this? Thank you

 

#container {

font-family: Arial, Verdana, Tahoma, Helvetica, sans-serif;

        font-size: 15px;

}

.district_1 table {
         font-family: Arial, Verdana, Tahoma, Helvetica, sans-serif;	
         font-size: 15px;
}

 

<script type="text/javascript">

$(document).ready(function() {

 

 

//To hide DISTRICTS & SUBJECTS

$('.district_1').hide();

$('#zone_1').click(function() {

//check to make sure field is checked

if ($(this).attr('checked')) {

$('.district_1').fadeIn(400);

} else {

$('.district_1').fadeOut(400);

}

}); // end click()

}); // end ready()

 

</script>

 

<?php

/***North's DISTRICTS***/

echo '<input name="zone[]" type="checkbox" id="zone_1" value="1">';

echo '<span class="zone_text_enlarge"><label for="zone_1">North</label></span><br />';

 

$dbc = mysqli_connect('localhost', '111', '111', '111')

or die(mysqli_error());

$query = ("SELECT * FROM tutor_preferred_district ORDER BY district_id ASC LIMIT 7");

$sql = mysqli_query($dbc, $query)

or die(mysqli_error());

 

echo'<div class="district_1">';

echo'<table><tr>'; // Start your table outside the loop... and your first row

$count = 0; // Start your counter

while($data = mysqli_fetch_array($sql)) {

/* Check to see whether or not this is a *new* row

If it is, then end the previous and start the next and restart the counter.

*/

            if ($count % 5 == 0) {

echo "</tr><tr>"; $count = 0;

}

echo '<td><input name="district[]" type="checkbox" id="'.$data['district_id'].'" value="'.$data['district_id'].'"/>';

echo '<label for="'.$data['district_id'].'">'.$data['district_name'].'</label></td>';

$count++; //Increment the count

      }

  echo '</tr></table><br/><br/>'; //Close your last row and your table, outside the loop

 

echo '</div>';

 

[attachment deleted by admin]

Link to comment
Share on other sites

  • 3 weeks later...
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.