Destramic Posted March 23, 2011 Share Posted March 23, 2011 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 Quote Link to comment https://forums.phpfreaks.com/topic/231552-error-automatic-style-given-to-inputbreak-and-lables/ Share on other sites More sharing options...
monkeytooth Posted March 26, 2011 Share Posted March 26, 2011 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. Quote Link to comment https://forums.phpfreaks.com/topic/231552-error-automatic-style-given-to-inputbreak-and-lables/#findComment-1192681 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.