my div tag is not aligning properly after jquery.html replacement

Posted by Adam on Stack Overflow See other posts from Stack Overflow or by Adam
Published on 2011-01-02T20:21:38Z Indexed on 2011/01/02 22:53 UTC
Read the original article Hit count: 124

Filed under:
|
|
<div class="container"><span class="field_label">Job</span><input class="fields2" type="text" maxlength="200" name="first_name" /></div>
    <div class="container"><span class="field_label">Date</span><input class="fields2" type="text" maxlength="200" name="the_date" id="the_date" /></div>
    <div class="container" id="sched_text">sdfdsfdsf</div> <!-- schedule text-->
    <div class="container"><span class="field_label">Time</span>


.container{
position:relative;
display:block;
float:right;
border: 1px solid;
padding-bottom: 10px;
}

my html/css here has my containers aligning right below each other. However, when I use .html in jquery to change or add text to sched_text it throws the css off and places the div tag not as a block anymore but placed somewhere to the side.

Does something change when you use .html text? what would the proper way of doing it? Thanks

Ok the issue is that my .html or .text is not a string. I just did .text(the_Week[i][1]); which results in a number. How do I present it as a string?

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about html