php - HTML-Content doesn't apply CSS after insert with AJAX -


i'm using ajax page content specific page database. works perfect problem:

for 'contact'-page, i'm getting form (just html...) database. ignores css, i've loaded in head of page. form-parts have ids , classes.

my thought is, caused insert of content after loaded css.

note: i'm not using jquery , don't want use in project.

the form looks following:

<form method="post" action="#"> <label id="clabel" for="sendname">name:<span class="required"></span></label><input type="text" class="contact" name="sendname" maxlength="30" required placeholder="your name..(required)"><br> <label id="clabel" for="sendemail">email:<span class="required"></span></label><input type="email" class="contact" name="sendemail" maxlength="100" placeholder="your email-address.."><br> <label id="clabel" for="reason">contact reason:</label><input type="text" class="contact" name="sendreason" maxlength="30" required placeholder="your reason..(required)"><br> <label id="clabel" for="sendmsg"></label><textarea id="cmsg" class="noresize" name="sendmsg" required placeholder="your message..(required)" onfocus="this.value=\"\"; this.onfocus=null;"></textarea><br> <label id="clabel" for="contactbutton"></label><input class="contactbutton" type="submit" name="contactbutton" value="send"> </form> 

to take on css or javascript, check link: philliprohde.bugs3.com/new_/

the css following (with changed id class):

label.clabel{ display:inline-block; width: 7em; } input.contact{ width:400px; margin-top:5px; } /* button of contact form */ .contactbutton{ width: 100px; background: #c1c1c1; color: #8b0000; text-transform: uppercase; text-shadow: #000 1px 1px; margin-top: 10px; } textarea.noresize { resize:none; } textarea#cmsg { width: 400px; height: 120px; margin-top:5px; border:none; font-family: tahoma, sans-serif; } 

solved. hoster hasn't accepted new css-file (i don't know why). deleted old, uploaded again , works.

thank support.!

two things:

  • your preview link isn't working;
  • the markup you've posted isn't valid (you're reusing id 'clabel' labels).

neither of these should impact css, although multi-ids raise few issues elsewhere in development.

adding content page after load styled css you've got in page (that's relevant) .

here's suggest debug:

  • is possible css isn't being included expect? open firebug or chrome developer tools , make sure you're not getting errors when css passes through.
  • is possible css isn't targetting new content correctly?
  • it isn't obvious question (at moment), possible you're loading content in via iframe (in case css of parent page wouldn't effect it).

Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -