How about the 'display: inline-block' ?
.bluegradient {
display: inline-block;
}
I noticed this bugs for months. It commonly see when the first child element has set the vertical-margin.
How about the 'display: inline-block' ?
.bluegradient {
display: inline-block;
}
I noticed this bugs for months. It commonly see when the first child element has set the vertical-margin.
What errors do you get ? I wanna mention that this forum is PHP forum and your thread beseem with Javascript forum. Move your thread to the Javascript forum or start a new thread in Javascript forum.
How did you saved the image? Did you use upload form for image upload and store the only file name in the database ? Check manual in your mysql tables, how does the image store, and what type of the field.
Try to limit the records for each page. And pass the parameter via the pagination link and use these parameters for retrieving records. There is some ways for this process and you can choose your convenient way.
Post some of your code.
Of course, it is better. If you need to set the width for the element and want to add the spaces between it's content and from the edge. Put another wrapper and give padding is prevent from the losing of it's original width. It is not mention that 'PADDING' and 'WIDTH' might not use together. That is OK if you will handle the manners.
Change
$var_list = explode("\n",$var_data);
to
$var_list = explode("\r\n",$var_data);
Why not CSS 'hover' ? a:hover { background: url('yourimage.jpg'); }
You should not use javascript ( onmouseover ) and ( onmouseout ) event for this simply matter.
What right border do you refer ? I guess that the the box at the right sidebar. The DIV with class name 'sb_box' has 300px width. The parent (sidebar) wrapper has only 290px width. 'sb_box' has also padding '10px' (all round) and border '1px' (all round). So the total width of the 'sb_box' is currently '322px'. It flow out '32px' from it parent. Remove the 'width' (it has already 100% width of it parent by default ) or use proper width which does not overflow from its parent.
Note that the real size of the element is the total of it's ( width + border + padding ).
Put this line into your style
.form_enc div {
overflow: hidden;
margin-bottom: 4px;
}
.form_enc div input {
float: left;
}
Set margin for the two input within 'form_enc_loc' and 'form_enc_data' for staying a little far from each.
.form_enc_loc input, .form_enc_data input {
margin-right: 3px;
}
You have one things to solve, 'enviar' link is not properly showing within the form and it is hidden by it's parent 'overflow:hidden' declaration.
Do you really need to set the static height for 'form_enc' ? Remove 'height' declaration or use 'min-height' for flowing the content normally inside it.
DIV is block-level and it takes 100% from its parent width and you always do not need to set the width for all block-level elements.
How do you receive the data via form. I see no '$_POST' or '$_GET' or '$_REQUEST'. You wouldn't get any data if you are using the form.
$query = "INSERT INTO vartotojai SET vardas = '$vardas', slaptazodis = '$slaptazodis', el_pastas = '$el_pastas', avataras = '$avataras', parasas = '$parasas'";
Where are '$vardas,$slaptazodis,$el_pastas,$avataras,$parasas' come from ? You must use '$_POST[]' (for post method), '$_GET[]' (for get method), or '$_REQUEST[]' (for both post and get).
It may like:
$vardas = $_POST['vardas'];
$slaptazodis = $_POST['slaptazodis'];
$el_pastas = $_POST['el_pastas'];
$avataras = $_POST['avataras'];
$parasas = $_POST['parasas'];
if($vardas != "" && $slaptazodis != "" && $el_pastas != ""){
$query = "INSERT INTO vartotojai SET vardas = '$vardas', slaptazodis = '$slaptazodis', el_pastas = '$el_pastas', avataras = '$avataras', parasas = '$parasas'";
mysql_query($query);
}
Hope this help.
Use 'the_excerpt()' function and you need to insert the content in the excerpt field at wordpress back-end.
Try this
html, body {
height: 100%;
min-height: 101%;
overflow: visible;
}
The scrollbar will always show no matter how much content the page has.
Here is example for CSS pop-up menu.
Horizontal
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title></title>
<style type="text/css">
<!--
#menu {
background: #f0f0f0;
border: 1px solid #ddd;
height: 33px;
margin: 0;
padding: 0;
}
#menu li {
border-right: 1px solid #f8f8f8;
display: block;
float: left;
height: 33px;
line-height: 33px;
margin: 0;
position: relative;
}
#menu li a {
border-right: 1px solid #d7d7d7;
display: block;
padding: 0 1.4em;
}
#menu li .sub {
background: #f0f0f0;
border: 1px solid #ddd;
border-top: 1px solid #f0f0f0;
display: none;
left: -0.1em;
margin: 0;
min-width: 176px;
padding: 0;
position: absolute;
top: 34px;
width: 176px;
}
#menu .sub li {
border: none;
border-bottom: 1px solid #d7d7d7;
display: block;
float: none;
}
#menu li:hover ul a {
background: none;
border: none;
}
#menu li:hover a, #menu li a:hover, #menu li .sub li:hover a, #menu li .sub li a:hover {
background: #f7f7f7;
}
#menu li:hover .sub {
display: block;
}
-->
</style>
</head>
<body>
<ul id="menu">
<li><a href="#">Item 1</a>
<ul class="sub">
<li><a href="#">Item 1-1</a></li>
<li><a href="#">Item 1-2</a></li>
<li><a href="#">Item 1-3</a></li>
</ul>
</li>
<li><a href="#">Item 2</a>
<ul class="sub">
<li><a href="#">Item 2-1</a></li>
<li><a href="#">Item 2-2</a></li>
<li><a href="#">Item 2-3</a></li>
</ul>
</li>
<li><a href="#">Item 3</a>
<ul class="sub">
<li><a href="#">Item 3-1</a></li>
<li><a href="#">Item 3-2</a></li>
<li><a href="#">Item 3-3</a></li>
</ul>
</li>
<li><a href="#">Item 4</a>
<ul class="sub">
<li><a href="#">Item 4-1</a></li>
<li><a href="#">Item 4-2</a></li>
<li><a href="#">Item 4-3</a></li>
</ul>
</li>
<li><a href="#">Item 5</a>
<ul class="sub">
<li><a href="#">Item 5-1</a></li>
<li><a href="#">Item 5-2</a></li>
<li><a href="#">Item 5-3</a></li>
</ul>
</li>
</ul>
</body>
</html>
Vertical
<!DOCTYPE …
Post some of your codes that you thought it is not working.
You should together two floated input boxes within one div. The input are inline element and you can simply position line by line.
<div><input type="text" /><input type="text" /></div>
Attach margin property for a littler far from the two input box. Put 'overflow:hidden' to the div which held the input box. It may hide the white space in IE and may got the same effect in cross browser.
$result = mysql_query("SELECT * FROM tbl_localnews ORDER BY local_date DESC LIMIT 10");
Post some your codes or link to the site. We can't help without seeing any codes.
$sql="insert into personal_ex(Personalexperience,Sex,Age,Sexuality) values ('$post[Personalexperience]','$post[Sex],$post[Age]','$post[Sexuality]')";
What is the '$post[]' ? Is it the php array or the HTTP_POST_VAR ? The correct use of the HTTP_POST_VAR is '$_POST' or '$_REQUEST'.
Try this one:
document.getElementById(toPopulate).innerHTML = "<a href='javascript:showOtherContent(\"" + toPopulate + "\");'>show</a>"
Hope this help.
Wrong forum. Move your thread to the relavant forum such as C++ or C# under the Software Development.
I check your site with Firebug Developer Tool. The DIV with unique ID 'main' is not correctly nested and it child element or content are out of the normal flow. It may be the float or absolute position. Add this to your code:
#main {
overflow: hidden;
margin-bottom: 33px; /* Add bottom margin for adding white spaces between the sticky footer and main div */
}
#footer {
background: #FFFFFF; /* Add background-color to the footer and cover the underneath contents */
}
Hope this help.
Use 'float' property instead of the 'absolute' position. It is the bad idea for using the absolute position for layout formatting. You can float these two layer 'logo' and 'sign-up' box left and right respectively. The absolute position calculate the browser or it parent which has the relative position, and it will be moving all the times when the screen resizing.
.logo {
float: left;
margin-right: 22px;
width: 538px;
}
.signup {
float: left;
width: 472px;
}
By seeing with my firefox developer tool, '538px' width for logo and '472px' for signup box are enough and they can stay quite their position. Note that you need to clear after the floating element.
You can simply use '<br />' tag or '<div style="clear: both;"></div>' both. Find out here how to fix float issues on cross browsers compatibilities.
<script type="text/javascript">
document.getElementById('id1').onchange=function(){}
</script>
What errors did you get? Form always required 'action', that is the url where the form data received and processed.
<form name="login" method="post" id="login_form" action="login.php">
I tested with IE7 and it sent the data finely. What version of IE are you using and what is the problem ? Post more info and we can help.
Line 9 and 21. objs[i].outerHTML
Replace 'outerHTML' with 'innerHTML'.
I did not test and I am not sure it work not. You should post this thread in the Javascript forum.
<body style="background-image:url('image.jpg'); background-repeat:no-repeat; background-position: 50% 50%; background-attachment: fixed;">
That is all. You should use CSS that is more comfortable than HTML attributes. And also HTML is for content structure and CSS is the representation of the content.
<?php
$value=$_POST;for($i=0;$i<$value;$i++)
{
echo "Question NO:";
echo '<input type="text" name="qno[]">'."\t";echo "Enter Marks:";
echo '<input type="text" name="marks[]">'."\t";
echo "<br>";
}
?>
</form>
<form name="form1" method="post" action="cellresult.php">
<label>
<input type="submit" name="Submit" value="Submit">
</label>
</form></body>
Fields are out of the form. Try with this one.
<form name="form1" method="post" action="cellresult.php">
<?php
if(isset($_POST['question'])){
$value=$_POST['question'];
for($i=0;$i<$value;$i++)
{
echo "Question NO:";
echo '<input type="text" name="qno[]">'."\t";
echo "Enter Marks:";
echo '<input type="text" name="marks[]">'."\t";
echo "<br>";
}
}
else{
echo "No question.";
}
?>
<input type="submit" name="Submit" value="Submit">
</form>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
<!--[if lte IE 7]>
<link rel="stylesheet" href="ie.css" type="text/css" />
<![endif]-->
You can use above codes in the HTML head tags for separating stylesheet for IE with other modern browsers. All modern browsers ignore above statement.
You can choose IE version with 'gte, gt, lte, lt' which means (greater than and equal, greater than, less than and equal, less than).
You can directly embed the style codes between this syntax.
<!--[if gte IE]>
<style type="text/css">
<!--
body {
}
-->
</style>
<![endif]-->
Hope that help.
Where '$_POST' var comes from? '$_POST' are always comes from via HTML form. Are you trying to show this page after submitting the form from the other pages.
Your codes are not wrong, but the logic is wrong. Print some value if the '$_POST' var has not defined.
<?php if ($_POST)
{
$nytt = ($_POST);$oppdater = mysql_query("SELECT * FROM 'omoss' WHERE 'id'='1'") or die(Error);
$row = mysql_fetch_assoc($oppdater);$gammelt = $row;
$querychange = mysql_query("
UPDATE omoss SET innhold='$nytt' WHERE id='1'
");
echo "<form action='rediger_om.php' method='post'>
<textarea name='omoss' id='omoss'>$gammelt</textarea>
<input type='submit' value='Oppdater' id='oppdater' name='oppdater' />
</form>
";
}
?>
<?php
if (isset($_POST['Oppdater'])){
$nytt = ($_POST['omoss']);
$oppdater = mysql_query("SELECT * FROM 'omoss' WHERE 'id'='1'") or die(Error);
$row = mysql_fetch_assoc($oppdater);
$gammelt = $row['innhold'];
$querychange = mysql_query("
UPDATE omoss SET innhold='$nytt' WHERE id='1'
");
?>
<form action='rediger_om.php' method='post'>
<textarea name='omoss' id='omoss'>$gammelt</textarea>
<input type='submit' value='Oppdater' id='oppdater' name='oppdater' />
</form>
<?php
}
else{
?>
This text will show when the 'if' statement ignore.
<?php
}
?>
Try with above codes. And you should use 'isset()' method for checking had the var already set.
By seeing you code, you may be trying to get the '$_POST' via submitting the form from the other pages. If it like so, you can use ($_POST != ''). If the '$_POST' is not null, the script run otherwise do other process as 'else' statement.
Makr sure that the field name 'UniqueIdentifier' is correct. Anyway, what is the type of this 'UniqueIdentifier' field ?
Try with this:
echo "<option value='" . $uid . "'>" . $ln . $spacer . $fn . "</option>";
Instead of:
echo "<option value='$uid'>" . $ln . $spacer . $fn . "</option>";
Use 'isset()' method to check the '$_POST' vars are already defined.
if(isset($_POST['site']) && isset($_POST['Record']) && isset($_POST['BMI']) && isset($_POST['Weight'])){
$site = $_POST['site'];
$record = $_POST['Record'];
$bmi = $_POST['BMI'];
$weight = $_POST['weight'];
$sql1 = "INSERT INTO intake2(site, Record, BMI, Weight) VALUES('$site', '$record','$bmi','$weight')";
$qyr = mysqli_query($cxn,$sql1);
}
You can use '$_REQUEST' for both '$_GET' and '$_POST'.
Well, how do you want to get the number of question ( pass the value via submitting the form or generating by javascript DOM element without page loading )
You can simply create text field automatically by using 'for loop' in both PHP and Javascript. Some examples:
In PHP:
$question = $x;
for($i=0;$i<$x;$i++){
echo '--------------------- cell<br />';
}
In Javascript:
var question = x;
for(i=0;i<x;i++){
document.write('---------------cell<br />');
}
'$x' and 'x' are the variables for the number of questions.
You can post some of your codes here. So everyone can see your codes and can find your problem.
What is the field type for (type and cat_parent). You don't need the quote for the integer. Make sure that the field names are also correct.
Your codes are non-standard and wrong syntax. You can't call two function with only one click event.
And also the variable are not matching (randomRed,randomGreen,randomBlue), I don't see these three variable defined. It must be (red,green,blue).
Try with below:
<html>
<body>
<form name="frmOne">
W2+: <input type="text" name="w" style="background-color:#123456;" size="5" value="0" />
<p>
Total Z: <input type="text" name="z" size="5" value="1" /></p>
<p>
<input type="button" name="b1" value="Pluss One" onClick="calculate()" /></p>
</form>
<script language="javascript" type="text/javascript">
function calculate()
{
A = document.frmOne.w.value;
A = Number(A);
C = A+1;
document.frmOne.w.value = C;
document.frmOne.z.value = C+1;
return colourchange();
}
</script>
<script language="javascript" type="text/javascript">
function colourchange()
{
var red=Math.floor(Math.random()*256)
var green=Math.floor(Math.random()*256)
var blue=Math.floor(Math.random()*256)
document.frmOne.w.style.backgroundColor = "rgb("+red+","+green+","+blue+")";
}
</SCRIPT>
</body>
</html>
It should work. Hope this help!
I have no special places or things and also I have no great books for studying CSS or HTML. All of my know about HTML and CSS are mostly based on practice.
I tried with googling and learned on some HTML, CSS websites. They gave me basic and foundation. I learned these sites and spent many times infront of my PC and wrote many codes and run on my PC.w3schools is greate place for beginners and HTML.net is also a good site for HTML and CSS.
You should start with trying to know about CSS properties and references and their structure. How their properties work and cross browser compatibilities and common errors that you will face with coding CSS.
You should know about the box model related with CSS http://css-tricks.com/the-css-box-model/. You should also know the CSS float property and how they cause the cross browser issues and how to fix that http://www.smashingmagazine.com/2009/10/19/the-mystery-of-css-float-property/, http://www.smashingmagazine.com/2007/05/01/css-float-theory-things-you-should-know/
You can find about DTD at here http://www.w3.org/QA/2002/04/valid-dtd-list.html.
One of the important thing is testing and practice what you found.
Hope that help...
Try this:
#header
{
height: 231px;
width: 100%;
background-image: url('../images/header_background.png');
background-repeat: repeat-x;
background-position: top left;
text-align: center;
}
#grass
{
height: 231px;
width: 100%;
background-image: url('../images/header_grass.png');
background-repeat: inherit;
background-position: bottom center;
}
#shadow
{
height: 13px;
width: 100%;
background-image: url('../images/shadow.png');
background-repeat: inherit;
background-position: top left;
}
I suggest you to try with the simplest layout. Below is my examples.
html, body {
font: 13px Arial,Tahoma,Sans-serif;
margin: 0;
padding: 0;
}
h3 {
font-size: 13px;
text-align: center;
}
#wrapper {
margin: 12px auto;
width: 1024px;
}
#main-menu {
background: #f0f0f0;
border: 1px solid #d8d8d8;
height: 60px;
line-height: 60px; /* Set line-height same with height will give the equal vertical alignment */
text-align: center;
}
#content {
padding: 12px 0;
}
#columns {
overflow: hidden;
}
#left {
float: left;
width: 287px;
}
#main_photo, #main_form {
border: 1px solid #ddd;
font-weight: bold;
margin-bottom: 12px;
padding: 87px 10px;
text-align: center;
}
#middle {
border: 1px solid #ddd;
float: left;
margin-left: 22px;
padding: 13px 8px 87px;
width: 432px;
}
#right {
float: right;
width: 250px;
border: 1px solid #ddd;
}
#main_text_head {
background: #e8e8e8;
border: 1px solid #d7d7d7;
margin: 0 0 9px;
padding: 8px 3px;
}
#message {
overflow: hidden;
position: relative;
}
#avatar {
background: #f7f7f7;
border: 1px solid #d8d8d8;
float: left;
font-weight: bold;
height: 111px;
line-height: 111px;
width: 117px;
text-align: center;
}
#message_text {
margin-left: 124px;
padding: 8px 13px;
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Что-то вроде страницы.</title>
</head>
<body>
<div id="wrapper">
<div id="main-menu">
Main Menu
</div>
<div id="content">
<div id="columns">
<div id="left">
<div id="main_photo">Main Photo</div>
<div id="main_form">Main Form</div>
</div>
<div id="middle">
<h3 id="main_text_head">Main Text Head</h3>
</div>
<div id="right">
<h3>Right Side</h3>
</div>
</div>
<div id="message">
<div id="avatar">Avatar</div>
<div id="message_text">Message</div>
</div>
</div>
<div id="footer">
</div> …
Have you already tried with 'em' instead of 'px' ?
The current CSS version has no special property for stretching the background-image.
*{ margin:0px; padding:0px;}
It removed all default margin and padding. You list-item has no margin and the bullet is not visible. Try to fill padding within the list-item to see the bullet.
ul.a {
list-style: disc;
margin: 0;
padding: 0 0 0 20px;
}
Hope this help.
The 'float' property cause the cross browser issues. Here is a lot of techniques with CSS 'float' property.
http://www.smashingmagazine.com/2009/10/19/the-mystery-of-css-float-property/
http://www.smashingmagazine.com/2007/05/01/css-float-theory-things-you-should-know/
Add 'position: relative' and 'z-index' property to the table cell greater than 'biographyphoto' z-index property. The example below has 10 for table cell 'z-index'.
#maintable td {
position: relative;
z-index: 10;
}
You forgot to put the 'id=tblSample'. In javascript function var tbl = document.getElementById('tblSample');
, you took the element with 'id=tblSample', but there is no 'id=tblSample' in the HTML.
You want to generate the text box in the table, right? Set the 'id=tblSample' to the table.
Here it is <table width="200" border="1" style="margin-left:300px" id="tblSample">
Many absolute positions. Absolute position is not good for layout formatting. It should use for creating dynamic contents and creating HTML DOM element with browser scrptings (javascript, vbscript, etc).
Absolute position moved absolutely from it's parent or document. It left no space and it parent's cannot render correctly.
You should use exact height instead of minimum height calculating maximum heights of absolute elements inside it.
'display: inline-block' would render the content according to the size of the content inside it.