Jump to content

error: automatic style given to input/break and lables


Destramic

Recommended Posts

hey guy i have a script which will add fields to a div but when i view the div's html it has a <style> added to the input/label and break tags but i dont undertstand why...especially has the page hasnt got a style sheet yet...if anyone could help me undstand why this is happening please?

 

html added to div

input_field = '<label for="' + field_name + '">' + field_label + ' ' + count + ' : </label><input id="'+ field_name +'" name="' + field_name + '" type="' + field_type + '" value="" />';

 

html inside div

<label style="display: inline;" for="game_types1">Game Type - Name 1 : </label><input style="display: inline;" id="game_types1" name="game_types1" value="" type="text">

 

thanks you

Im going to guess your using Chrome, or Firefox. Both browsers try to correct things within HTML, trying to display everything uniformly as far as code goes.. So depending on what the rest of your page looks like, that could just be the browser being itself. However, it could be something from any given script your pulling into your page.. the one liner you showed, I dont see why it would do that, soo its from something else be it your scripting or the browsers automated bahavior.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.