Using the theme "clean" of Recaptcha with IE9<, the input to enter captcha does not appear in (#recaptcha_table > tbody:nth-child(1) > tr:nth-child(2)), but is shown over again. How to display input correctly changing the css?
I've checked and reCAPTCHA is not working in IE 8 from my end.
The simplest way to resolve this porblem is to create your own style of reCAPTCHA. So, is not necesarry to use the "clean" template from reCAPTCHA.
This code will show your reCAPTCHA (I have made a style similary to "clean"):
Check JSBin: http://jsbin.com/utubal/1/edit OR check below:
<style>
#recaptcha_widget {
width: 400px;
padding: 5px;
border: 1px solid #CCCCCC;
font-family: Calibri, Ubuntu Light, Arial;
font-size: 12px;
}
#recaptcha_widget a {
text-decoration: none;
color: #2D7FC0;
font-weight: bold;
}
#recaptcha_image {
border: 1px solid #CCCCCC;
}
#recaptcha_response_field {
width: 300px;
}
</style>
<script type="text/javascript">
var RecaptchaOptions = {
theme : 'custom',
custom_theme_widget: 'recaptcha_widget'
};
</script>
<div id="recaptcha_widget" style="display:none">
<div style="float:left; width: 80%;">
<div id="recaptcha_image"></div>
<div class="recaptcha_only_if_incorrect_sol" style="color:red">Incorrect please try again</div>
<span class="recaptcha_only_if_image">Enter the words above:</span>
<span class="recaptcha_only_if_audio">Enter the numbers you hear:</span>
<input type="text" id="recaptcha_response_field" name="recaptcha_response_field" style="border: 1px solid #cccccc;"/>
</div>
<div style="float: left; margin-left: 10px;">
<div>REFRESH</div>
<div class="recaptcha_only_if_image">AUDIO</div>
<div class="recaptcha_only_if_audio">IMAGE</div>
<div>Help</div>
</div>
<div style="clear: both;"></div>
</div>
<script type="text/javascript"
src="http://www.google.com/recaptcha/api/challenge?k=YOUR_PUBLIC_KEY">
</script>
<noscript>
<iframe src="http://www.google.com/recaptcha/api/noscript?k=YOUR_PUBLIC_KEY"
height="300" width="500" frameborder="0"></iframe><br>
<textarea name="recaptcha_challenge_field" rows="3" cols="40">
</textarea>
<input type="hidden" name="recaptcha_response_field"
value="manual_challenge">
</noscript>
I hope this will help you!
PS.: Please remember to override YOUR_PUBLIC_KEY with your key (2 locations).
Related
I am using tinyMCE editor, and I am using 2 same divs with float:right; in the CSS.
The issue I am having is that when I save the HTML, and open the saved content on any browser, it doesn't look the same as in the editor.
As an example I have attached 2 pictures, note there is a difference in the height of the blue boxes (in the editor and in the output).
Editor:
Output:
Here is the HTML in the editor:
<div class="sub-mw" div="">
1 <br />1<br />1<br />1<br />
<!--#*#TStem1#*#-->
<div id="enews">
<div class="enewstext">News</div>
</div>
<!--#*#TEtem1#*#-->
<br /><br /><br />
<!--#*#TStem1#*#-->
<div id="enews">
<div class="enewstext">News</div>
</div>
<!--#*#TEtem1#*#-->
1<br />1<br />1<br />1<br />1<br /><br />as<br />dasd
<br />asd<br />a<br />da
</div>
Also Here is the css used:
.enewstext {
color: #FFF;
font-size: 14px;
font-family: Arial, Helvetica, sans-serif;
padding-top: 15px;
padding-bottom: 15px;
background: #0163b1;
width: 100%;
box-shadow: 0px 5px 0px #FFF;
text-indent: 20px;
}
#enews{
background:#3394e1;
width:18%;
height:300px;
float:right;
}
Edit 1:
In this scenario, tracing the issue, it is caused by the <br> tag. It has a smaller height in the tinymce editor than on chrome.
Any Idea on how to fix this ?
I'm facing a strange problem. I use a HTML template and it's actually only one page with a box in the middle. The content of the box can change and you navigate to the different version by some buttons at the top of the page.
I have added a paragraph in the landing view and when I move to another view and return back the text disappears.
I can see that the problem isn't that it doesn't show the text, the problem is that it completely disappears and only leaves:
<div id="comment2" class="one-half"></div>
I cannot figure out what causes it though.
Here's my HTML:
<div id="content_wrapper">
<div id="header"><span>Το <b>INTRO HALL</b> είναι το <b>TOP</b>!</span><div id="close"></div></div>
<div id="content">
<div class="scroll-pane">
<div class="content" id="content1">
<div id='subscribe_label'>Η ιστοσελίδα του γυμναστηρίου Intro Hall θα ανοίξει σε:</div>
<div id="counter"></div><div class="clear"></div>
<div class="form_title"><h1>Κέρδισε ένα δώρο!</h1></div>
<div class="column_cont">
<div id="comment2" class="one-half"><p>Συμπλήρωσε τη διπλανή φόρμα για να μπεις στο Club Επικοινωνίας του Intro Hall και κέρδισε ένα δώρο. Απλά γράψε το όνομα και το email σου και κλίκαρε 'Στείλτε το δώρο μου!'.</p></div>
<!-- Begin MailChimp Signup Form -->
<div id="mc_embed_signup" class="one-half" style="float:right;">
<form action="http://topgreekgyms.us6.list-manage2.com/subscribe/post?u=d6acf8949532b107b7b21c9d0&id=e2131451dc" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
<div class="mc-field-group">
<input type="text" value="" name="FNAME" class="required" id="firstname" placeholder="Όνομα">
</div>
<div class="mc-field-group" style="margin-bottom:4px;">
<input type="email" value="" name="EMAIL" class="required email" id="primaryemail" placeholder="Email" style="float:right;">
</div>
<div id="mce-responses" class="clear">
<div class="response" id="mce-error-response" style="display:none"></div>
<div class="response" id="mce-success-response" style="display:none"></div>
</div>
<div class="clear"><input type="submit" value="ΣΤΕΙΛΤΕ ΤΟ ΔΩΡΟ ΜΟΥ!" name="subscribe" id="mc-embedded-subscribe" class="button_link hover_fade large_button red"></div>
</form>
</div>
<!--End mc_embed_signup-->
</div>
</div>
And here's the CSS
#content_wrapper {
position:absolute;
width:506px;
height:506px;
z-index: 1000;
top:0;
left:0;
/* Fallback for web browsers that doesn't support RGBa */
background: rgb(62, 62, 62);
/* RGBa with 0.6 opacity */
background: rgba(0, 0, 0, 0.52);
}
#header {
width:506px;
height:47px;
background: #161616;
}
#header span {
display:block;
margin:auto;
height: 100%;
line-height: 47px;
width:447px;
color: #ffffff;
padding: 0px 29px 0 29px;
background: #ac0003;
text-align:center;
font-family: arial;
font-size: 23px;
text-transform: none;
word-spacing: 5px;
}
#content {
width: 502px;
height: 306px;
border: 2px solid #161616;
border-width: 0 2px 0 2px;
margin-top:-15px;
padding-top:15px;
}
.content {
display:none;
width: 458px;
}
#close {
position: absolute;
top:11px;
right:12px;
background: transparent url(../img/close.png) no-repeat;
width:25px;
height: 25px;
cursor: pointer;
display:none;
}
.column_cont {
margin: 0 -15px 0 0px;
clear:both;
}
.clear {clear:both;}
#comment2 {
color: #fff;
display:block;
font-size: 16px;
text-align: justify;
line-height: 20px;
margin-bottom:10px;
}
.one-half, .one-third, .two-third, .one-fourth, .three-fourth {
margin:0 5px 0 15px;
float:left;
}
.one-half {
width:206px;
}
Also, here's a link to the website.
Thanks in advance for any help or opinions!
In your big_countdown.js file, there is a listener on the close button which contains document.getElementById('comment2').innerHTML = ""; :
$("#close").click(function() {
$('.content').each(
function() {
$(this).fadeOut('fast');
});
$('#content1').stop().fadeIn('fast');
$("#close").css('display','none');
$('#dots div').each(
function() {
$(this).removeClass('dot_active');
});
$("#dot1").addClass('dot_active');
window.setTimeout(function() {
api.reinitialise();
},300);
// Remove this line below
document.getElementById("comment2").innerHTML="";
});
Removing this last line should solve the problem.
Using a good JavaScript debugger can help you figure this out really quickly next time. Firebug, an add-in to Fixfox is one of the best. To get to the same answer as albertxing you can do the following steps:
Load the page
Right click on the element that is disappearing and select "Inspect element with Firebug"
Your element will be highlighted in Firebug's HTML viewer
Right-click on on this element and select "break on element removal"
Toggle the buttons at the bottom of your web page to make the element disappear
Firebug will detect the change and take you immediately to the line of code that caused it to change.
Presto!
I've been working on a gallery made in php. Some time ago, I made the layout using tables. It worked out super. Now, using tables for layouts is not recommended and sort of "deprecated" (I don't understand why, if someone could explain this to me, thank you). So, I'm trying to change the layout from tables to divs and I'm having a lot of problems (can someone recommend a good reference to how to make a good layout using css?). So far I managed this: http://jsfiddle.net/hochvater/4DbUU/ . MY FIRST QUESTION is this: how do I make the #panel_poze div to show up in the top of the container div, glued to the #panel_albume (as it is now)? I don't understand why #panel_albume is lined with the 3rd div contained by the div it is glued to (#panel_albume). My second question would be this: can't I just put the big table (you can imagine easily how it looks by the structure of the divs) into a container div and sort of leave it as it was...would this still be considered "deprecated" or not recommended?
THE CSS CODE:
body {
background-color: black;
color: white;
}
#font-face {
font-family:"john_handy";
src: url("john_handy.eot");
src: local("¢"), url("john_handy.woff") format("woff"), url("john_handy.TTF") format("opentype"), url("john_handy.svg#john_handy") format("svg");
}
#font-face {
font-family:"bradley_hand";
src: url("bradley_hand.eot");
src: local("¢"), url("bradley_hand.woff") format("woff"), url("bradley_hand.TTF") format("opentype"), url("bradley_hand.svg#bradley_hand") format("svg");
}
a:link {
color:white;
}
/* unvisited link */
a:visited {
color:white;
}
/* visited link */
a:hover {
color:red;
}
/* mouse over link */
a:active {
color:blue;
}
/* selected link */
.fonty {
text-align:center;
font: italic 30px john_handy, serif;
}
a.fonty {
font-style: normal;
font-size:20px;
}
#pp {
margin: 15% auto;
max-width:80%;
min-width:850px;
text-align: center;
white-space:nowrap;
}
.sec {
position: static;
margin: 0% 4%;
max-width: 20%;
min-width: 200px;
display: inline-block;
}
.imageOff {
border: 3px solid transparent;
margin: auto;
}
.imageOn {
border: 3px solid red;
opacity: 0.7;
filter: alpha(opacity=70);
margin: auto;
}
.selected {
padding: 2px;
border: 1px solid red;
}
.submit {
/*margin: 0;*/
border: none;
/*padding: 0;*/
background: black;
font:normal 20px john_handy, serif;
color:white;
}
.subsel {
color:red;
}
.submit:hover {
color:red;
}
.poze_albume {
border: 1px solid red;
height: 250px;
width: 200px;
}
#panel_poze {
border: 1px solid blue;
width: 70%;
min-width: 400px;
display: inline-block;
height: 100px;
}
#panel_albume {
border: 1px solid yellow;
display:inline-block;
}
#container {
text-align: center;
width: 100%;
border: 1px solid white;
min-width: 700px;
}
.album {
}
THE GALLERY CODE:
<?php session_start(); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<link rel="stylesheet" type="text/css" href="./zastyle.css" />
</head>
<body><!-- oncontextmenu="return false;"> -->
<h1 class="fonty">Portofolio</h1>
<?php
if (!isset($_POST['restart']))
{
?>
<div id="pp">
<div class="sec ">
<form action="./galerie.php" method="post" enctype="multipart/form-data">
<input class="imageOff" onmouseover="this.className='imageOn'" onmouseout="this.className='imageOff'" type="image" src="./studio/photoshoot.JPG" title="Studio Photography" alt="Studio Photography" />
<input type="hidden" name="album" value="studio" />
<input type="hidden" name="restart" value="1"/>
<br />
<input type="submit" class="submit" value="Studio Photography" />
</form>
</div>
<div class="sec ">
<form action="./galerie.php" method="post" enctype="multipart/form-data">
<input class="imageOff" onmouseover="this.className='imageOn'" onmouseout="this.className='imageOff'" type="image" src="./outdoor_lifestyle/lifestyle.jpg" title="Outdoor and Lifestyle Photography" alt="Outdoor and Lifestyle Photography" />
<input type="hidden" name="album" value="outdoor" />
<input type="hidden" name="restart" value="1"/>
<br />
<input type="submit" class="submit" value="Outdoor and Lifestyle" />
</form>
</div>
<div class="sec " >
<form action="./galerie.php" method="post" enctype="multipart/form-data">
<input class="imageOff" onmouseover="this.className='imageOn'" onmouseout="this.className='imageOff'" type="image" src="./landscapes/landscapes.jpg" title="Landscapes" alt="Landscapes" class="album" />
<input type="hidden" name="album" value="landscapes" />
<input type="hidden" name="restart" value="1" />
<br />
<input type="submit" class="submit" value="Landscapes" />
</form>
</div>
</form>
</div>
<?php //require("za_menu.php"); ?>
<?php
}
if (isset($_POST['restart'])&&$_POST['restart']==1){
?>
<div id="container">
<div id="panel_albume">
<div class="poze_albume">
<form action="./galerie.php" method="post" enctype="multipart/form-data">
<input class="imageOff <?php
if($_POST['album']=='studio') echo 'selected';
?>" onmouseover="this.className='imageOn'" onmouseout="this.className='imageOff <?php
if($_POST['album']=='studio') echo 'selected';
?>'" type="image" src="./studio/photoshoot.JPG" title="Studio Photography" alt="Studio Photography" />
<input type="hidden" name="album" value="studio" />
<input type="hidden" name="restart" value="1" />
<br />
<input type="submit" class="submit <?php
if($_POST['album']=='studio') echo 'subsel';
?>" value="Studio Photography" />
</form>
</div>
<div class="poze_albume">
<form action="./galerie.php" method="post" enctype="multipart/form-data">
<input class="imageOff <?php
if($_POST['album']=='outdoor') echo 'selected';
?>" onmouseover="this.className='imageOn'" onmouseout="this.className='imageOff <?php
if($_POST['album']=='outdoor') echo 'selected';
?>'" type="image" src="./outdoor_lifestyle/lifestyle.jpg" title="Outdoor and Lifestyle Photography" alt="Outdoor and Lifestyle Photography" />
<input type="hidden" name="album" value="outdoor" />
<input type="hidden" name="restart" value="1" />
<br />
<input type="submit" class="submit <?php
if($_POST['album']=='outdoor') echo 'subsel';
?>" value="Outdoor and Lifestyle" />
</form>
</div>
<div class="poze_albume">
<form action="./galerie.php" method="post" enctype="multipart/form-data">
<input class="imageOff <?php
if($_POST['album']=='landscapes') echo 'selected';
?>" onmouseover="this.className='imageOn'" onmouseout="this.className='imageOff <?php
if($_POST['album']=='landscapes') echo 'selected';
?>'" type="image" src="./landscapes/landscapes.jpg" title="Landscapes" alt="Landscapes" class="album"/>
<input type="hidden" name="album" value="landscapes" />
<input type="hidden" name="restart" value="1" />
<br />
<input type="submit" class="submit <?php
if($_POST['album']=='landscapes') echo 'subsel';
?>" value="Landscapes" />
</form>
</div>
</div>
<div id="panel_poze"></div>
</div>
<?php }
session_destroy();
?>
</body>
</html>
Thank you for your time invested in reading this and any ideas would be appreciated.
I'd recomend you to take a look at a CSS grid system, such as Twitter Bootstrap or 960.gs
To answer your question about tables: the use of tables were ok before CSS. CSS will help you organize your content in much better and flexible ways. I suggest you take a look at CSS Tricks and the W3 CSS tutorials to make sure you understand how <div> works and how you can float them around. Also, HTML5 take the semantic meaning of the containers and will allow you to better represent the structure of your site. Take a look at HTML5 Boilerplate if you want to learn more or even get a initial template to work with.
Roping off of Andre's answer above. A good way to practice is to simply make a website which has very basic CSS properties, but multiple different formats of the divs, so that you can understand how the boxes interact.
One such project that I did way back when was to simple make a site with a header, a horizontal navigation, then several content blocks that were full-width, 50% - 50% dual columns, 25% - 50% - 25% triple column, 33% - 33% - 33% triple, and 25%-25%-25%-25% quad columns, then a footer.
Something you should definitely be looking into is responsive layout so you can make your gallery mobile friendly.
Edit:
Is this what you were meaning as far what you want it to look like?
http://jsfiddle.net/4DbUU/1/
I changed these rules:
#panel_poze {
border: 1px solid blue;
width: 70%;
min-width: 400px;
height: 100px;
float: left;
}
#panel_albume {
border: 1px solid yellow;
float: left;
}
#container {
text-align: center;
width: 100%;
border: 1px solid white;
min-width: 700px;
clear: both;
overflow: hidden;
}
I deleted your display: inline-block; and added float: left; to both children. Then I told the container to set overflow:hidden; and to clear:both; (left and right floats)
Edit 2:
For clarity requested by the OP...
In lamens terms, when using float:left or float:right on an element, in a way picks that element up off the page and allows it to "float" which ever direction you tell it to. It performs this float with complete disregard to elements that are nearby which are not floated. Elements that are nearby then start to wrap around the floated element. This is sometimes desirable, for example floating an image left or right and allowing the text to wrap around the image. In some cases however you don't want other elements to wrap around the ones you have floated. In those cases you use the clear command to tell the next closest element to not wrap around floated elements. See these two examples:
http://jsfiddle.net/GL4Pn/2/
In the above example, no clear is present. Notice the text in the yellow .footer div is coming up between the two floated elements.
http://jsfiddle.net/GL4Pn/3/
In this example I have added clear: left; to .footer (the yellow div). Notice it is no longer wrapping up into the tiny space between divs, but it is still wrapping aroudn the element to the right.
http://jsfiddle.net/GL4Pn/4/
Here I have switched it to clear: right; notice it is no longer wrapping up to the left div or in the space between divs anymore. It is nested neatly beneath the right div. This is because the right div is the longest div. If I was to increase the height of the left div to be longer than the right div...
...Like here: http://jsfiddle.net/GL4Pn/5/
Notice now the div wraps up to the right, but not between the divs. Now.. If I change the code to clear: both;...
http://jsfiddle.net/GL4Pn/6/
Notice it is back to how it was with clear:right when the right div was longest. And if I change the left div to be shorter than the right and keep clear:both in place...
http://jsfiddle.net/GL4Pn/7/
The same result as before...
It is important to note that elements will only wrap floats if they are the very next element in the code. If I go back to the first example with no clear, but add an extra div beneath footer, you'll see that it does not misbehave as the .footer div has already take the available space.
http://jsfiddle.net/GL4Pn/8/
I am new to coding HTML/CSS but I have a pretty good grasp so far. I have spent the last few hours trying to get my code side by side but it always remains stacked. My code is
<div class="api" style="float:left;">
<a href="https://play.google.com/store/apps/details?id=com.jrummy.liberty.toolboxpro" target="_blank">
<img src="http://developer.android.com/images/brand/en_generic_rgb_wo_60.png" style="width:50%; border:0" alt="Download ROM Toolbox Pro from Google Play" title="Download ROM Toolbox Pro from Google Play">
</a>
<div>
<div class='appbrain-app'>
<a href='http://www.appbrain.com/app/com.jrummy.liberty.toolboxpro' style='font-size: 11px; color: #555; font-family: Arial, sans-serif;'>
</a>
<script type='text/javascript' language='javascript' src='http://www.appbrain.com/api/api.nocache.js'></script>
</div>
</div>
</div>
And my CSS is,
.api {
margin: 0 auto;
margin-top: 1em;
max-width: 700px;
padding: 1em;
background-color: #e2e2e2;
border: 1px solid #C9C9C9;
box-shadow: 0 0 2px #C9C9C9;
-moz-box-shadow: 0 0 2px #C9C9C9;
-webkit-box-shadow: 0 0 2px #C9C9C9;
border-radius: 3px;
-moz-border-radius: 3px;
-khtml-border-radius: 3px;
-webkit-border-radius: 3px;
display: inline-block;
}
If you tell me what I am missing in order to get the info displayed side by side I would greatly appreciate it. If you have any other code cleanups that you can point out that would be great also but not needed.
EDIT:
Thank you for all your help guys, I have tried both Watson and Pete's answers but sadly they are not working. I took some screenshots of what it is without your code and with your code. You can find them here, https://dl.dropbox.com/u/11217802/sidebyside.png
I have also been able to get it working but I am trying to avoid as much inline styling as possible and I believe that I have pointless tags and way too many <div> for this small project.
<div class="api">
<div>
<td style="vertical-align: middle; text-align: center; background: #e2e2e2; border-top: 0px; ">
<a rel="nofollow" href="https://play.google.com/store/apps/details?id=com.jrummy.liberty.toolboxpro" class="no_ul external" target="_blank">
<img src="http://developer.android.com/images/brand/en_generic_rgb_wo_60.png" style="width:100%; border:0" alt="Download ROM Toolbox Pro from Google Play" title="Download ROM Toolbox Pro from Google Play">
</a>
</td>
</div>
<div style="float: left;">
<div class="appbrain-app">
<a href='http://www.appbrain.com/app/com.jrummy.liberty.toolboxpro' style='font-size: 11px; color: #555; font-family: Arial, sans-serif;'>
</a>
</div>
<script type='text/javascript' language='javascript' src='http://www.appbrain.com/api/api.nocache.js'></script>
</div>
</div>
As far as the CSS, that did not change from what I posted orginally.
Thanks again Grady
try this:
.api a, .api div, .api img {
float: left;
}
and a tip: you should indent your code, so the child nodes are inside the parent nodes, like:
<div>
<a>Example</a>
<img>
<div>
<a>Example</a>
</div>
</div>
sibling nodes (when one tag is not inside another) should be indented the same amount.
looking at your code you have only floated the containing div, all the divs inside it are still block elements, if you want these to be side by side, you can do one of the following:
change them to inline elements .api div {display:inline;}
change them to inline-block elements .api div {display:inline-block;}
float them left .api div {float:left;}
EDIT
Having looked at your edit and tried your code in jsfiddle, the problem is the javascript is creating a lot of extra divs. I have changed your code layout to get things side by side:
http://jsfiddle.net/xFu4Z/1/
html
<div class="api">
<img src="http://developer.android.com/images/brand/en_generic_rgb_wo_60.png" style="width:50%; border:0" alt="Download ROM Toolbox Pro from Google Play" title="Download ROM Toolbox Pro from Google Play" />
</div>
<div class='appbrain-app'>
<a href='http://www.appbrain.com/app/com.jrummy.liberty.toolboxpro' style='font-size: 11px; color: #555; font-family: Arial, sans-serif;'></a>
<script type='text/javascript' language='javascript' src='http://www.appbrain.com/api/api.nocache.js'></script>
</div>
CSS
.api,
.appbrain-app {float:left;}
Please note that you will need to make sure the widths of .api and .appbrain-app added together don't exceed the width of the container they are in - I just noticed that on your original styles you have set a max-width of 700px which means that it is probably going to push the .appbrain-app div down a line
I restructured your markup:
<style>.api {
margin: 0 auto;
margin-top: 1em;
max-width: 700px;
min-width: 300px;
padding: 1em;
background-color: #e2e2e2;
border: 1px solid #C9C9C9;
box-shadow: 0 0 2px #C9C9C9;
-moz-box-shadow: 0 0 2px #C9C9C9;
-webkit-box-shadow: 0 0 2px #C9C9C9;
border-radius: 3px;
-moz-border-radius: 3px;
-khtml-border-radius: 3px;
-webkit-border-radius: 3px;
display: inline-block;
}
.appbrain-app { float: right; width: 48%; border: 1px solid red; }
</style>
<div class="api" style="float:left;">
<div>
<a href="https://play.google.com/store/apps/details?id=com.jrummy.liberty.toolboxpro" target="_blank">
<img src="http://developer.android.com/images/brand/en_generic_rgb_wo_60.png" style="width:50%; border:0" alt="Download ROM Toolbox Pro from Google Play" title="Download ROM Toolbox Pro from Google Play">
</a>
<div class='appbrain-app'>
<a href='http://www.appbrain.com/app/com.jrummy.liberty.toolboxpro' style='font-size: 11px; color: #555; font-family: Arial, sans-serif;'>
</a>
<script type='text/javascript' language='javascript' src='http://www.appbrain.com/api/api.nocache.js'></script>
</div>
</div>
</div>
I have bizarre css behavior. I have a div container (#right-input) that houses a textarea and button and they pop out of #userinput container if I do not delete the font: x-small arial,helvetica,sans-serif; in a body tag that I have. Anyone have any ideas? How can a font declaration affect an element like that?
body {
font: x-small arial,helvetica,sans-serif;
background: #000;
margin:0;
text-align:center;
}
#userinput {
font-size:130%;
color: #333;
margin:10px auto 10px auto;
padding:10px;
background: #F7F7F7;
width:570px;
height:135px;
position:relative;
z-index:9999;
border: 1px solid #888;
-moz-border-radius-bottomleft:7px;
-moz-border-radius-bottomright:7px;
-moz-border-radius-topleft:7px;
-moz-border-radius-topright:7px;
opacity: 0.85;
/* for IE */
filter:alpha(opacity=85);
}
#right-input{
clear:left;
float:right;
width:480px;
}
<div id="userinput">
<div id="right-input">
Send a message to others watching!
<form id="form" action="form.php?action=add" method="post">
<TEXTAREA id="message" class="limited" name="message" maxlength="1000" COLS="45" ROWS="6"></TEXTAREA>
<br>
<input id="send" type="submit" value="Send!" />
</form>
</div>
</div>
With your current code, if you resize #right-input, it doesn't adjust #userinput because #right-input is floated which takes it out of the document flow.
Try changing your html to this:
<div id="userinput">
<div id="right-input">
Send a message to others watching!
<form id="form" action="form.php?action=add" method="post">
<TEXTAREA id="message" class="limited" name="message" maxlength="1000" COLS="45" ROWS="6"></TEXTAREA>
<br>
<input id="send" type="submit" value="Send!" />
</form>
</div>
<!-- added div to clear float -->
<div style="clear:both;"></div>
</div>
It should make sure that your textarea will stay inside its div.
If you say that font: x-small causes the problem, try to replace it with
font-size: 14px; /* 14px - for example */
font-family: arial,helvetica,sans-serif;