Help with css please
Can some help me put my css correct please. Basicly im learning and its crap! The only good thing so far is my dropdown menu.
My wording which start Bristol equestrian services isn't even in the middle of the box, I can't write content next to my image or it goes down to the bottom of the image, and my content area which start quality..... is to the right!
http://46.20.119.224/~bristol1/index_2.html
Karen
I'm not sure where you want to go with this but try the below:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<link href="http://46.20.119.224/~bristol1/css/dropdown.css" rel="stylesheet" type="text/css" />
<style type="text/css">
/* global css styles */
body {
margin:0;
padding:0;
/* page specific css styles */
body,td,th {
font-family: Arial, Helvetica, sans-serif;
font-size: 16px;
color: #000;
h1,h2,h3,h4,h5,h6 {
font-family: Georgia, "Times New Roman", Times, serif;
font-weight: bold;
#navMenu {
width: 994px;
margin: 0 auto;
#header {
background-image: url(http://46.20.119.224/~bristol1/images/headerimage.jpg);
width: 994px;
height: 160px;
margin: 0 auto;
/* topSection */
#topSection {
width: 994px;
margin: 0 auto;
overflow: hidden;
#topSectionLeft {
float: left;
width: 300px;
#topSectionLeft h1 {
font-size: 24px;
color: #000;
font-family: Georgia, "Times New Roman", Times, serif;
font-weight: bold;
text-align: center;
#topSectionLeft p {
margin: 0 0 0 0;
padding: 0 15px 15px 15px;
#topSectionRight p {
margin: 0 0 0 0;
padding: 0 15px 15px 15px;
#topSectionCentre {
float: left;
width: 456px;
#topSectionRight {
float: left;
width: 238px;
/* content */
#content {
width: 994px;
margin: 0 auto;
overflow: hidden;
#content p {
font-family: "Comic Sans MS", cursive;
font-size: 18px;
color: #000;
margin: 0;
padding: 20px 20px 20px 20px;/*top, right,bottom,left*/
font-weight: bold;
text-align: center;
#rightContent {
float: left;
width: 694px;
min-height: 280px;
#footer {
background-color: #FFC;
width: 994px;
margin: 0 auto;
#footer p {
margin: 0px 0px 0px 0px; /*top, right, bottom, left*/
padding: 0px 0px 0px 0px; /*top, right, bottom, left*/
</style>
</head>
<body>
<div id="header"></div>
<div id="navMenu">
<ul>
<li><a href="index_2.html">Home</a>
<ul>
</ul> <!-- end inner ul-->
</li> <!-- end li-->
</ul> <!-- end main ul-->
<ul>
<li><a href="stables.html">Gallery</a>
<ul>
<li><a href="stables.html">Stables</a></li>
<li><a href="fieldshelters.html">Field Shelters</a></li>
<li><a href="combination.html">Combination</a></li>
<li><a href="newdesign.html">New Designs</a></li>
<li><a href="optionalextras.html">Optional Extras</a></li>
</ul> <!-- end inner ul-->
</li> <!-- end li-->
</ul> <!-- end main ul-->
<ul>
<li><a href="prices.html">Prices</a>
<ul>
</ul> <!-- end inner ul-->
</li> <!-- end li-->
</ul> <!-- end main ul-->
<ul>
<li><a href="delivery.html">Delivery</a>
<ul>
<li><a href="areascovered.html">Areas Covered</a></li>
</ul> <!-- end inner ul-->
</li> <!-- end li-->
</ul> <!-- end main ul-->
<ul>
<li><a href="testimonials.html">Testimonials</a>
<ul>
</ul> <!-- end inner ul-->
</li> <!-- end li-->
</ul> <!-- end main ul-->
<ul>
<li><a href="#">Links</a>
<ul>
<li><a href="#">link item</a></li>
<li><a href="#">link item</a></li>
<li><a href="#">link item</a></li>
<li><a href="#">link item</a></li>
<li><a href="#">link item</a></li>
</ul> <!-- end inner ul-->
</li> <!-- end li-->
</ul> <!-- end main ul-->
</ul> <!-- end inner ul-->
</li> <!-- end li-->
</ul> <!-- end main ul-->
<ul>
<li><a href="#">Contact</a>
<ul>
<li><a href="#">link item</a></li>
</ul> <!-- end inner ul-->
</li> <!-- end li -->
</ul> <!-- end main ul-->
<br class="clearFloat" />
</div> <!-- end navMenu -->
<div id="topSection">
<div id="topSectionLeft">
<h1><strong>Mobile Field Shelters and Stables</strong> </h1>
<p>Bristol Equestrian Services have been supplying and designing quality Field Shelters and Stables for many years.
<p>We can design stables to custormer requirements and specifications.</p>
<p>The photograph to the right is our latest design and the feedback has been fantastic</p>
</div><!-- end topSectionleft -->
<div id="topSectionCentre">
<img src="http://46.20.119.224/~bristol1/images/newdesign.jpg" width="456" height="300" />
</div><!-- end topSectionCenter -->
<div id="topSectionRight">
<p>Some content goes here</p>
</div><!-- end topSectionRight -->
</div><!-- end topSection -->
<div id="content">
<div id="rightContent">
<h2>Quality Guaranteed Mobile Field Shelters and stables</h2>
<p>We appreciate how difficult it is for anyone to buy from the internet, especially a Stable or Field Shelter. We are so confident that you will not be dissapointed with the quality that we offer ..........</p>
</div><!-- end rightContent -->
</div><!-- end content -->
<div id="footer"><p>This is where the footer content goes</p></div><!-- end footer -->
</body>
</html>
Similar Messages
-
I would really appreciate some help with my search & results page that is now throwing up the following error:
Warning: mysql_free_result() expects parameter 1 to be resource, null given in...... line (the line number refers to the following code:
mysql_free_result($RSsearchforsale);
mysql_free_result($RsSearchForSale2);
mysql_free_result($RsSearchForSale3);
mysql_free_result($RsSearchForSale4);
I am new to php and am setting up a dynamic site in Dreamweaver (thanks to the Missing Manual – very helpful). I apologise in advanced for my lengthy description of the problem (perhaps get yourself a drink before continuing!)
I have a Search page with 4 list menus where the user can select an option from ANY or ALL of the menus, if a menu is not selected the value posted to the results page will be 'zzz'.
On the results page I have 4 recordsets, all getting the correct results, only one recordset is required to run depending on how many of the menus from the search page have been selected and a test is run before executing the sql using a SWITCH statement checking how many of the menus had passed the 'zzz' values from the Search page if you see what I mean. The results page has Repeating Regions, Recordset Paging and Display Record Count. The exact result that I require are generated by this method.
THE PROBLEM, when a user makes a selection the first page of 10 results is fine, but the error message above is shown at the bottom of the page, AND when the user clicks NEXT to go to the next page of results THERE ARE NO RESULTS.
This is exactly what happens depending on how many menus selected and which recordset is used:
4 menus selected from Search: runs RSsearchforsale, results correct but 3 error messages on 1st page relating to mysql_free_result($RsSearchForSale2),mysql_free_result($RsSearchForSale3), & mysql_free_result($RsSearchForSale4). The display record count shows correct results found. NEXT page is empty of results and still shows the correct display record count as if it should be displaying the records, also has the same 3 error messages.
3 menus selected from Search: runs RsSearchForSale2, results correct but 3 error messages on 1st page relating to mysql_free_result($RSsearchforsale),mysql_free_result($RsSearchForSale3), & mysql_free_result($RsSearchForSale4). The display record count shows correct number of results. NEXT page shows results from the DEFAULT setting of the recordset and the Display record count reflects this new set of results. Also still shows the 3 mysql_free_results for RsSearchForSale2, 3 and 4.
2 menus selected from Search: runs RsSearchForSale3, results correct but 2 error messages on 1st page relating to mysql_free_result($RSsearchforsale) & mysql_free_result (RsSearchForSale4). The display record count is correct. NEXT page does exactly the same as described in above 3 menus selected.
1 menu selected from search: runs RsSearchForSale4, results correct but 1 error meaasge on 1st page, mysql_free_result($RSsearchforsale). Display record count is correct and again when NEXT page is selected does as described in above where 2 or 3 menus selected.
If you have gotten this far without falling asleep then thank you and well done! I have pasted my code below and I know its a lot to ask but please please can you give me an idea as to where or why I have gone wrong. I felt I was so close at perfecting this search and have been working on it for weeks now. I feel sure the problem is because I have 4 recordsets on the page but I could find no other way to get the exact results I wanted from the menus.
Looking forward to any help.
<?php require_once('Connections/propertypages.php'); ?>
<?php if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
return $theValue;
$currentPage = $_SERVER["PHP_SELF"];
$maxRows_RSsearchforsale = 10;
$pageNum_RSsearchforsale = 0;
if (isset($_GET['pageNum_RSsearchforsale'])) {
$pageNum_RSsearchforsale = $_GET['pageNum_RSsearchforsale'];
$startRow_RSsearchforsale = $pageNum_RSsearchforsale * $maxRows_RSsearchforsale;
$varloc_RSsearchforsale = "mpl";
if (isset($_POST['location'])) {
$varloc_RSsearchforsale = $_POST['location'];
$vartype_RSsearchforsale = "vil";
if (isset($_POST['type'])) {
$vartype_RSsearchforsale = $_POST['type'];
$varprice_RSsearchforsale = "pr9";
if (isset($_POST['price'])) {
$varprice_RSsearchforsale = $_POST['price'];
$varbed_RSsearchforsale = "b5";
if (isset($_POST['beds'])) {
$varbed_RSsearchforsale = $_POST['beds'];
switch (true) {
case ($varloc_RSsearchforsale != 'zzz' && $vartype_RSsearchforsale != 'zzz' && $varprice_RSsearchforsale != 'zzz' && $varbed_RSsearchforsale != 'zzz'):
mysql_select_db($database_propertypages, $propertypages);
$query_RSsearchforsale = sprintf("SELECT DISTINCT trueprice,`desc`, `propid`, `bathrooms`, `photo1`, locationtable.loc, typetable.style, bedtable.`number` FROM detailstable JOIN locationtable ON detailstable.location=locationtable.locid JOIN typetable ON detailstable.type=typetable.typeid JOIN pricetable ON detailstable.price=pricetable.priceid JOIN bedtable ON detailstable.beds=bedtable.bedid WHERE location=%s AND price=%s AND type=%s AND beds=%s ORDER BY detailstable.trueprice ASC", GetSQLValueString($varloc_RSsearchforsale, "text"),GetSQLValueString($varprice_RSsearchforsale, "text"),GetSQLValueString($vartype_RSsearchforsale, "text"),GetSQLValueString($varbed_RSsearchforsale, "text"));
$query_limit_RSsearchforsale = sprintf("%s LIMIT %d, %d", $query_RSsearchforsale, $startRow_RSsearchforsale, $maxRows_RSsearchforsale);
$RSsearchforsale = mysql_query($query_limit_RSsearchforsale, $propertypages) or die(mysql_error());
$row_RSsearchforsale = mysql_fetch_assoc($RSsearchforsale);
if (isset($_GET['totalRows_RSsearchforsale'])) {
$totalRows_RSsearchforsale = $_GET['totalRows_RSsearchforsale'];
} else {
$all_RSsearchforsale = mysql_query($query_RSsearchforsale);
$totalRows_RSsearchforsale = mysql_num_rows($all_RSsearchforsale);
$totalPages_RSsearchforsale = ceil($totalRows_RSsearchforsale/$maxRows_RSsearchforsale)-1;
$queryString_RSsearchforsale = "";
if (!empty($_SERVER['QUERY_STRING'])) {
$params = explode("&", $_SERVER['QUERY_STRING']);
$newParams = array();
foreach ($params as $param) {
if (stristr($param, "pageNum_RSsearchforsale") == false &&
stristr($param, "totalRows_RSsearchforsale") == false) {
array_push($newParams, $param);
if (count($newParams) != 0) {
$queryString_RSsearchforsale = "&" . htmlentities(implode("&", $newParams));
$queryString_RSsearchforsale = sprintf("&totalRows_RSsearchforsale=%d%s", $totalRows_RSsearchforsale, $queryString_RSsearchforsale); } ?>
<?php require_once('Connections/propertypages.php'); ?>
<?php if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
return $theValue;
$currentPage = $_SERVER["PHP_SELF"];
$maxRows_RsSearchForSale2 = 10;
$pageNum_RsSearchForSale2 = 0;
if (isset($_GET['pageNum_RsSearchForSale2'])) {
$pageNum_RsSearchForSale2 = $_GET['pageNum_RsSearchForSale2'];
$startRow_RsSearchForSale2 = $pageNum_RsSearchForSale2 * $maxRows_RsSearchForSale2;
$varloc2_RsSearchForSale2 = "mpl";
if (isset($_POST['location'])) {
$varloc2_RsSearchForSale2 = $_POST['location'];
$varprice2_RsSearchForSale2 = "p9";
if (isset($_POST['price'])) {
$varprice2_RsSearchForSale2 = $_POST['price'];
$vartype2_RsSearchForSale2 = "vil";
if (isset($_POST['type'])) {
$vartype2_RsSearchForSale2 = $_POST['type'];
$varbed2_RsSearchForSale2 = "b5";
if (isset($_POST['beds'])) {
$varbed2_RsSearchForSale2 = $_POST['beds'];
switch (true) {
case ($varloc2_RsSearchForSale2 == 'zzz'):
case ($varprice2_RsSearchForSale2 == 'zzz'):
case ($vartype2_RsSearchForSale2 == 'zzz'):
case ($varbed2_RsSearchForSale2 == 'zzz'):
mysql_select_db($database_propertypages, $propertypages);
$query_RsSearchForSale2 = sprintf("SELECT DISTINCT trueprice,`desc`, `propid`, `bathrooms`, `photo1`, locationtable.loc, typetable.style, bedtable.`number` FROM detailstable JOIN locationtable ON detailstable.location=locationtable.locid JOIN typetable ON detailstable.type=typetable.typeid JOIN pricetable ON detailstable.price=pricetable.priceid JOIN bedtable ON detailstable.beds=bedtable.bedid WHERE (location=%s AND price=%s AND type=%s) OR (location=%s AND price=%s AND beds=%s) OR (location=%s AND type=%s AND beds=%s) OR (price=%s AND type=%s AND beds=%s) ORDER BY detailstable.trueprice ASC", GetSQLValueString($varloc2_RsSearchForSale2, "text"),GetSQLValueString($varprice2_RsSearchForSale2, "text"),GetSQLValueString($vartype2_RsSearchForSale2, "text"),GetSQLValueString($varloc2_RsSearchForSale2, "text"),GetSQLValueString($varprice2_RsSearchForSale2, "text"),GetSQLValueString($varbed2_RsSearchForSale2, "text"),GetSQLValueString($varloc2_RsSearchForSale2, "text"),GetSQLValueString($vartype2_RsSearchForSale2, "text"),GetSQLValueString($varbed2_RsSearchForSale2, "text"),GetSQLValueString($varprice2_RsSearchForSale2, "text"),GetSQLValueString($vartype2_RsSearchForSale2, "text"),GetSQLValueString($varbed2_RsSearchForSale2, "text"));
$query_limit_RsSearchForSale2 = sprintf("%s LIMIT %d, %d", $query_RsSearchForSale2, $startRow_RsSearchForSale2, $maxRows_RsSearchForSale2);
$RsSearchForSale2 = mysql_query($query_limit_RsSearchForSale2, $propertypages) or die(mysql_error());
$row_RsSearchForSale2 = mysql_fetch_assoc($RsSearchForSale2);
if (isset($_GET['totalRows_RsSearchForSale2'])) {
$totalRows_RsSearchForSale2 = $_GET['totalRows_RsSearchForSale2'];
} else {
$all_RsSearchForSale2 = mysql_query($query_RsSearchForSale2);
$totalRows_RsSearchForSale2 = mysql_num_rows($all_RsSearchForSale2);
$totalPages_RsSearchForSale2 = ceil($totalRows_RsSearchForSale2/$maxRows_RsSearchForSale2)-1;
$queryString_RsSearchForSale2 = "";
if (!empty($_SERVER['QUERY_STRING'])) {
$params = explode("&", $_SERVER['QUERY_STRING']);
$newParams = array();
foreach ($params as $param) {
if (stristr($param, "pageNum_RsSearchForSale2") == false &&
stristr($param, "totalRows_RsSearchForSale2") == false) {
array_push($newParams, $param);
if (count($newParams) != 0) {
$queryString_RsSearchForSale2 = "&" . htmlentities(implode("&", $newParams));
$queryString_RsSearchForSale2 = sprintf("&totalRows_RsSearchForSale2=%d%s", $totalRows_RsSearchForSale2, $queryString_RsSearchForSale2);
}?>
<?php require_once('Connections/propertypages.php'); ?>
<?php if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
return $theValue;
$currentPage = $_SERVER["PHP_SELF"];
$maxRows_RsSearchForSale3 = 10;
$pageNum_RsSearchForSale3 = 0;
if (isset($_GET['pageNum_RsSearchForSale3'])) {
$pageNum_RsSearchForSale3 = $_GET['pageNum_RsSearchForSale3'];
$startRow_RsSearchForSale3 = $pageNum_RsSearchForSale3 * $maxRows_RsSearchForSale3;
$varloc3_RsSearchForSale3 = "mpl";
if (isset($_POST['location'])) {
$varloc3_RsSearchForSale3 = $_POST['location'];
$varprice3_RsSearchForSale3 = "p9";
if (isset($_POST['price'])) {
$varprice3_RsSearchForSale3 = $_POST['price'];
$vartype3_RsSearchForSale3 = "vil";
if (isset($_POST['type'])) {
$vartype3_RsSearchForSale3 = $_POST['type'];
$varbed3_RsSearchForSale3 = "b5";
if (isset($_POST['beds'])) {
$varbed3_RsSearchForSale3 = $_POST['beds'];
switch (true) {
case ($varloc3_RsSearchForSale3 == 'zzz' && $varprice3_RsSearchForSale3 == 'zzz'):
case ($varprice3_RsSearchForSale3 == 'zzz' && $vartype3_RsSearchForSale3 == 'zzz'):
case ($vartype3_RsSearchForSale3 == 'zzz' && $varbed3_RsSearchForSale3 == 'zzz' ):
case ($varbed3_RsSearchForSale3 == 'zzz' && $varloc3_RsSearchForSale3 == 'zzz'):
case ($varloc3_RsSearchForSale3 == 'zzz' && $vartype3_RsSearchForSale3 == 'zzz'):
case ($varprice3_RsSearchForSale3 == 'zzz' && $varbed3_RsSearchForSale3 == 'zzz'):
mysql_select_db($database_propertypages, $propertypages);
$query_RsSearchForSale3 = sprintf("SELECT DISTINCT trueprice,`desc`, `propid`, `bathrooms`, `photo1`, locationtable.loc, typetable.style, bedtable.`number` FROM detailstable JOIN locationtable ON detailstable.location=locationtable.locid JOIN typetable ON detailstable.type=typetable.typeid JOIN pricetable ON detailstable.price=pricetable.priceid JOIN bedtable ON detailstable.beds=bedtable.bedid WHERE (location=%s AND price=%s) OR (location=%s AND type=%s) OR (location=%s AND beds=%s) OR ( type=%s AND beds=%s) OR (price=%s AND type=%s) OR (price=%s AND beds=%s) ORDER BY detailstable.trueprice ASC", GetSQLValueString($varloc3_RsSearchForSale3, "text"),GetSQLValueString($varprice3_RsSearchForSale3, "text"),GetSQLValueString($varloc3_RsSearchForSale3, "text"),GetSQLValueString($vartype3_RsSearchForSale3, "text"),GetSQLValueString($varloc3_RsSearchForSale3, "text"),GetSQLValueString($varbed3_RsSearchForSale3, "text"),GetSQLValueString($vartype3_RsSearchForSale3, "text"),GetSQLValueString($varbed3_RsSearchForSale3, "text"),GetSQLValueString($varprice3_RsSearchForSale3, "text"),GetSQLValueString($vartype3_RsSearchForSale3, "text"),GetSQLValueString($varprice3_RsSearchForSale3, "text"),GetSQLValueString($varbed3_RsSearchForSale3, "text"));
$query_limit_RsSearchForSale3 = sprintf("%s LIMIT %d, %d", $query_RsSearchForSale3, $startRow_RsSearchForSale3, $maxRows_RsSearchForSale3);
$RsSearchForSale3 = mysql_query($query_limit_RsSearchForSale3, $propertypages) or die(mysql_error());
$row_RsSearchForSale3 = mysql_fetch_assoc($RsSearchForSale3);
if (isset($_GET['totalRows_RsSearchForSale3'])) {
$totalRows_RsSearchForSale3 = $_GET['totalRows_RsSearchForSale3'];
} else {
$all_RsSearchForSale3 = mysql_query($query_RsSearchForSale3);
$totalRows_RsSearchForSale3 = mysql_num_rows($all_RsSearchForSale3);
$totalPages_RsSearchForSale3 = ceil($totalRows_RsSearchForSale3/$maxRows_RsSearchForSale3)-1;
$queryString_RsSearchForSale3 = "";
if (!empty($_SERVER['QUERY_STRING'])) {
$params = explode("&", $_SERVER['QUERY_STRING']);
$newParams = array();
foreach ($params as $param) {
if (stristr($param, "pageNum_RsSearchForSale3") == false &&
stristr($param, "totalRows_RsSearchForSale3") == false) {
array_push($newParams, $param);
if (count($newParams) != 0) {
$queryString_RsSearchForSale3 = "&" . htmlentities(implode("&", $newParams));
$queryString_RsSearchForSale3 = sprintf("&totalRows_RsSearchForSale3=%d%s", $totalRows_RsSearchForSale3, $queryString_RsSearchForSale3);
} ?>
<?php require_once('Connections/propertypages.php'); ?>
<?php if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
return $theValue;
$currentPage = $_SERVER["PHP_SELF"];
$maxRows_RsSearchForSale4 = 10;
$pageNum_RsSearchForSale4 = 0;
if (isset($_GET['pageNum_RsSearchForSale4'])) {
$pageNum_RsSearchForSale4 = $_GET['pageNum_RsSearchForSale4'];
$startRow_RsSearchForSale4 = $pageNum_RsSearchForSale4 * $maxRows_RsSearchForSale4;
$varloc4_RsSearchForSale4 = "mpl";
if (isset($_POST['location'])) {
$varloc4_RsSearchForSale4 = $_POST['location'];
$vartype4_RsSearchForSale4 = "vil";
if (isset($_POST['type'])) {
$vartype4_RsSearchForSale4 = $_POST['type'];
$varprice4_RsSearchForSale4 = "p9";
if (isset($_POST['price'])) {
$varprice4_RsSearchForSale4 = $_POST['price'];
$varbed4_RsSearchForSale4 = "b5";
if (isset($_POST['beds'])) {
$varbed4_RsSearchForSale4 = $_POST['beds'];
switch (true) {
case ($varloc4_RsSearchForSale4 == 'zzz' && $vartype4_RsSearchForSale4 =='zzz' && $varprice4_RsSearchForSale4 == 'zzz'):
case ($varloc4_RsSearchForSale4 == 'zzz' && $varprice4_RsSearchForSale4 =='zzz' && $varbed4_RsSearchForSale4 == 'zzz'):
case ($varloc4_RsSearchForSale4 == 'zzz' && $varbed4_RsSearchForSale4 =='zzz' && $vartype4_RsSearchForSale4 == 'zzz'):
case ($varbed4_RsSearchForSale4 == 'zzz' && $vartype4_RsSearchForSale4 =='zzz' && $varprice4_RsSearchForSale4 == 'zzz'):
mysql_select_db($database_propertypages, $propertypages);
$query_RsSearchForSale4 = sprintf("SELECT DISTINCT trueprice,`desc`, `propid`, `bathrooms`, `photo1`, locationtable.loc, typetable.style, bedtable.`number` FROM detailstable JOIN locationtable ON detailstable.location=locationtable.locid JOIN typetable ON detailstable.type=typetable.typeid JOIN pricetable ON detailstable.price=pricetable.priceid JOIN bedtable ON detailstable.beds=bedtable.bedid WHERE location=%s OR price=%s OR type=%s OR beds=%s ORDER BY detailstable.trueprice ASC", GetSQLValueString($varloc4_RsSearchForSale4, "text"),GetSQLValueString($varprice4_RsSearchForSale4, "text"),GetSQLValueString($vartype4_RsSearchForSale4, "text"),GetSQLValueString($varbed4_RsSearchForSale4, "text"));
$query_limit_RsSearchForSale4 = sprintf("%s LIMIT %d, %d", $query_RsSearchForSale4, $startRow_RsSearchForSale4, $maxRows_RsSearchForSale4);
$RsSearchForSale4 = mysql_query($query_limit_RsSearchForSale4, $propertypages) or die(mysql_error());
$row_RsSearchForSale4 = mysql_fetch_assoc($RsSearchForSale4);
if (isset($_GET['totalRows_RsSearchForSale4'])) {
$totalRows_RsSearchForSale4 = $_GET['totalRows_RsSearchForSale4'];
} else {
$all_RsSearchForSale4 = mysql_query($query_RsSearchForSale4);
$totalRows_RsSearchForSale4 = mysql_num_rows($all_RsSearchForSale4);
$totalPages_RsSearchForSale4 = ceil($totalRows_RsSearchForSale4/$maxRows_RsSearchForSale4)-1;
$queryString_RsSearchForSale4 = "";
if (!empty($_SERVER['QUERY_STRING'])) {
$params = explode("&", $_SERVER['QUERY_STRING']);
$newParams = array();
foreach ($params as $param) {
if (stristr($param, "pageNum_RsSearchForSale4") == false &&
stristr($param, "totalRows_RsSearchForSale4") == false) {
array_push($newParams, $param);
if (count($newParams) != 0) {
$queryString_RsSearchForSale4 = "&" . htmlentities(implode("&", $newParams));
$queryString_RsSearchForSale4 = sprintf("&totalRows_RsSearchForSale4=%d%s", $totalRows_RsSearchForSale4, $queryString_RsSearchForSale4);
}?>Hi David,
Thank you for your reply and patience, we are getting closer in spite of me!
Of course i needed to change the name of the recordset, i did that the first time i did it (when i got the error), the when i re did it i forgot, in my defense i was also trying to get a full understanding of the code using the W3Schools php reference and writing by the side of the code on a piece of paper what it meant in English.
Anyway after re doing the code correctly it still displayed all the records of my database but i realised that was because i was POSTING from the search form and when i changed it to the GET method I now get results when all 4 list menus are selected from and the paging works. After reading about the POST / GET method i chose the POST option, is the GET method a better option in my circumstance?
On my site now if the user selects from 1,2 or 3 of the menus rather than selecting the relevant records it displays the NO RESULT page, I would like my users to be able to select from all of the menus or ANY combination of the menus and find exact results for their search, for example if they only select a location and a price i want it display all records that match that location and price with any number of bedrooms and any Type of property: Perhaps this is due to how my list menus are set up, for each menu the first Item label is Location (or Beds or Type or Price) and the value i have left blank which i believe means that it will use the item label as the value, the second Item label for all menus is Any and again the value has been left blank. All other item labels have values relevant to database records.
I do look forward to your reply and cannot thank you enough for following this through with me, please continue to bare with me just a little more,
best regards
Tessimon
Date: Wed, 11 Nov 2009 06:56:24 -0700
From: [email protected]
To: [email protected]
Subject: Help with message please: Warning: mysql_free_result() expects parameter 1 to be resource, null given in...... line
You're not adding the WHERE clause to the SQL query. My example code uses $query_search. You need to change that variable to match the name of your recordset, i.e. $query_RSsearchforsale.
Moreover, the WHERE clause needs to go before ORDER BY.
$query_RSsearchforsale = "SELECT trueprice,`desc`, `propid`, `bathrooms`, `location`, `type`, `price`, `beds`, `photo1`, locationtable.loc, typetable.style, bedtable.`number` FROM detailstable JOIN locationtable ON detailstable.location=locationtable.locid JOIN typetable ON detailstable.type=typetable.typeid JOIN pricetable ON detailstable.price=pricetable.priceid JOIN bedtable ON detailstable.beds=bedtable.bedid ";
// Set a flag to indicate whether the query has a WHERE clause
$where = false;
// Loop through the associatiave array of expected search values
foreach ($expected as $var => $type) {
if (isset($_GET[$var])) {
$value = trim(urldecode($_GET[$var]));
if (!empty($value)) {
// Check if the value begins with > or <
// If so, use it as the operator, and extract the value
if ($value[0] == '>' || $value[0] == '<') {
$operator = $value[0];
$value = ltrim(substr($value, 1));
} elseif (strtolower($type) != 'like') {
$operator = '=';
// Check if the WHERE clause has been added yet
if ($where) {
$query_RSsearchforsale .= ' AND ';
} else {
$query_RSsearchforsale .= ' WHERE ';
$where = true;
// Build the SQL query using the right operator and data type
$type = strtolower($type);
switch($type) {
case 'like':
$query_RSsearchforsale .= "`$var` LIKE " . GetSQLValueString('%' .
$value . '%', "text");
break;
case 'int':
case 'double':
case 'date':
$query_RSsearchforsale .= "`$var` $operator " .
GetSQLValueString($value, "$type");
break;
default:
$query_RSsearchforsale .= "`$var` = " . GetSQLValueString($value,
"$type");
$query_RSsearchforsale .= ' ORDER BY detailstable.trueprice ASC';
> -
Combo box and Check box..help with code please?
Here is my problem...i have a list of check boxes and according to which one is checked, i need combo boxes to populate different choices.
as an easy example im only using 2 check boxes and two combo boxes.
the check boxes are named Choice 1or2 with export values of 1 and 2
the Combo Boxes are named List A and List B..
both containing options that say you checked box 1 and you checked box 2
any help would be greatly appreciatedImplode wrote:
"Help with code please."
In the future, please use a meaningful subject. Given that you're posting here, it's kind of a given that you're looking for help with the code. The whole point of the subject is to give people a high level idea of what KIND of help with what KIND of code you need, so they can decide if they're interested and qualified to help.
Exception in thread "main" java.lang.NumberFormatException: For input string: "fgg"
at java.lang.NumberFormatException.forInputString(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at assignment1.Game.Start(Game.java:120)
at assignment1.RunGame.main(RunGame.java:18)This error message is telling you exactly what's wrong. At line 120 of Game.java, in the Start method (which should start with lowercase "s" to follow conventions, by the way), you're calling Integer.parseInt, but "fgg" is not a valid int. -
I have need help with something Please respond Quickly :)
I have need help with something Please respond Quickly ok so i have the linksys wrt54g Version 2.2 and i upgraded the firmware to V4.21.4 from this site http://homesupport.cisco.com/en-us/wireless/lbc/WRT54G and i clicked V2.2 for the router. So after i upgraded i lost internet ability i can't use the internet so i had to downgrade back to V4.21.1 but i want the things that newer update sloves. Please Help. Everything thing says DNS error? aka Modem.
$$Cgibbons$$Ya i tried that i tried restoring and redoing everything when i downgrade back to .1 it works fine though?
$$Cgibbons$$ -
Hi I got an email from itunes saying that my pre order was ready and when I click on the link from my ipad it takes me to the itunes store app and then it doesn't do anything help with this please .
<Link Edited By Host>Thanks for your advice, I went to the apple shop today for a face to face meeting with a tech and he checked everything and could not figure out why I was having this problem so we decided to give up on that account and create a whole new one for me using a different email address.
Now I can download apps on both my iPhone and ipad2.
If anyone is reading this in Brisbane Australia go to the Chermside apple shop and ask for Wade. He was fantastic!
Jan -
Itunes istallation freezes at 'Publishing Product Information'. Can anyone help with this please?
You need more memory. 4 GB is not enough:
1.12 GB Page-outs
[killed] com.apple.CallHistoryPluginHelper.plist
[killed] com.apple.CallHistorySyncHelper.plist
[killed] com.apple.cmfsyncagent.plist
[killed] com.apple.coreservices.appleid.authentication.plist
[killed] com.apple.sbd.plist
[killed] com.apple.security.cloudkeychainproxy.plist
[killed] com.apple.telephonyutilities.callservicesd.plist
7 processes killed due to memory pressure
Problem System Launch Daemons: ℹ️
[killed] com.apple.ctkd.plist
[killed] com.apple.icloud.findmydeviced.plist
[killed] com.apple.softwareupdate_download_service.plist
[killed] com.apple.wdhelper.plist
4 processes killed due to memory pressure -
I guess I am "old school" in that I have always used tables
to lay out my web pages. I decided I must learn to do it with CSS,
but I'm having a terrible time (and it shouldn't be so hard!). I
understand how to define the styles, add divs, etc. Here's what I'm
having trouble with:
How do I specify the normal page width to be 800 pixels,
however I want it to be relative to the browser (i.e., 100% of 800
pixels).
I understand the "float" tag, but if I have a right-hand
sidebar, I can't seem to get the text to the left (in a div called
"maincontent") to stop at the sidebar and wrap to the next line. I
tried specifying "Hidden" as my textbook suggests, but that has no
effect.
I can easily do all of this with tables, so do I really need
to abandon them?
Thanks!Hi Jane,
I'll try to answer all your questions, then a tip or two to
stop the main
content from dropping when the browser window size is
reduced.
- " I didn't realize that
margin-top: 0px;
margin-right: auto;
is not the same as margin: 0px auto;
That's right.
margin: 0px auto; is actaully saying make the top margin 0,
the right margin
auto, the bottom margin 0 and the left margin auto.
It's just CSS shorthand.
For example, you might have:
margin-top: 10px;
margin-right: 20px;
margin-bottom: 5px;
margin-left:15px;
You could just use margin: {10px 20px 5px 15px;}
Think of a clock to remember the directions.
12:00 top, 3:00 right, 6:00 bottom, 9:00 left.
If any of the values are the same, you can shorten it more.
For example, if top is 10, right is 20, bottom is 5 and left
is 20, it's
margin: {10px 20px 5px;}
If the 4th location (left) is missing a value, it makes it
the same as what
you have for right.
If top and bottom are 10px, and left and right are 20px,
it's:
margin {10px 20px;}
If the last two positions ( bottom and left vlaues ) are
missing, then it
will use the top value for the bottom, and the right value
for the left.
What auto right and left is doing is subtracting your content
width (the
container width) from the browser window width, and then
dividing the
remainder in 2 and applying each value to each side of the
container.
-"I found that they all took on the font of the maincontent
and I had to fix
them
individually. "
The only text that should be Time is the text in your main
content, where
you have that font defined. Everything else should be Arial
if you define
the body as such. I'll post a link at the end of this.
- "I put my bold sentence (Friendship, Fun, etc.) in h1, but
I had to change
the
color & size, so that added another style element. "
You don't need to give the h1 a class. You can actually just
style the h1
tag:
h1 {
margin: 10px 10px 2px;
font-size: larger;
color: #941238;
You can only use h1 once on a page.
You can use h2, h3, h4, etc, as many times as you would like,
and you can
style these just like the h1 style above.
- "I don't quite understand the .rightsidebar p { and
container p{
I am assigning the spacing to the <p> tag? What exactly
is that doing?"
That is saying, give all the <p> tags inside the
rightsidebar container the
follwing style.
So, in this example:
.rightsidebar p {
font-size: 18px;
margin: 2px 10px;
it's saying give all the <p> tags in this container a
size of 18 and margin
of 2px top and bottom, and 10px left and right.
It's a lot easier than giving a class to every <p> tag
- "I also don't quite understand the .clear {
Why not just choose clear:both on the next section <div
class="footer">"
You could, if the footer was in the container. It just needs
to be the final
element before the close of a container that contains the
float(s).
-Do you use the <div class="container"> technique all
the time?
Yes, most of the time. I usually put everything in it, and
use the
margin:0px auto; to center it.
That way, I don't have to try to get a number of different
elements to align
with the right and left sides by applying values to all of
them, which can
get tricky quickly.
-"If you'll indulge me one more question, I wonder if it's
possible to put a
graphic (say, of a putting green) underneath my
rightsidebar? I would want
the sidebar to lay on top of the putting green for an
interesting artistic
touch.
Yes, you can give that div a background image. You just need
to make the div
the same size as the image so you see it all (or vice-versa).
Now, to make that maincontent not drop like it does you can
remove the width
in the CSS. Now it will expand over to the left edge of the
rightsidebar.
You can control how close it gets by giving the right sidebar
a bigger left
margin. The point is, with no width assigned, the maincontent
will shrink
down to the longest word in it before it drops.
Here's what it looks like:
http://tnsgraphics.com/test2.htm
Let me know if you have any questions.
Take care,
Tim
"janeinpa" <[email protected]> wrote in
message
news:[email protected]...
> Hi, Tim...
>
> You have been very kind to help me learn CSS! I very
much appreciate it
> and
> am really delighted to have gained a better
understanding of this. I
> studied
> all your suggestions and started the page from scratch.
Take a look here:
>
http://www.allisonwebcreations.com/ewga_site/good_page/indexgood.htm
I'm
> very
> pleased with it. I discovered a couple of things:
>
> I didn't realize that
> margin-top: 0px;
> margin-right: auto;
>
> is not the same as margin: 0px auto;
>
> are they two different codes? Anyway, it didn't center
until I fixed
> that.
>
> I understand what you're saying about the font codes
being redundant,
> however
> I found that they all took on the font of the
maincontent and I had to fix
> them
> individually. This must be an error in how I'm coding
it. Is the order
> in
> which I did them to blame? I put it in the order that
I'm reading it, but
> perhaps I should do it differently.
>
> I also couldn't get the footer to move left to the
margin. I'm not sure
> why,
> since I think I followed all your suggestions.
>
> I put my bold sentence (Friendship, Fun, etc.) in h1,
but I had to change
> the
> color & size, so that added another style element.
I'm afraid that
> probably
> isn't correct. I also couldn't have my normal content
text follow
> immediately
> on the same line. Maybe that isn't possible.
>
> I don't quite understand the .rightsidebar p { and
container p{
> I am assigning the spacing to the <p> tag? What
exactly is that doing?
>
> I also don't quite understand the .clear {
> Why not just choose clear:both on the next section
<div class="footer"> ?
>
> Do you use the <div class="container"> technique
all the time? How do you
> decide what goes in it -- just floating items or can I
think of it as a
> table
> that holds all my main blocks of info? Why not include
the footer in it?
>
> If you'll indulge me one more question, I wonder if it's
possible to put a
> graphic (say, of a putting green) underneath my
rightsidebar? I would
> want the
> sidebar to lay on top of the putting green for an
interesting artistic
> touch.
>
> Thank you, thank you, thank you again. Here are my css
codes (which I
> have in
> an external file. Is it better to import or link to the
file?)
>
> Have a wonderful New Year.
>
>
>
>
>
>
> .body {
> padding: 0px;
> margin-top: 0px;
> font-family: Arial, Helvetica, sans-serif;
> }
> .masthead {
> width: 780px;
> margin: 0px auto;
> padding-top: 10px;
> padding-right: 0px;
> }
> .maincontent {
> background-color: #FFFFFF;
> text-align: left;
> width: 60%;
> margin-top: 0px;
> padding-top: 10px;
> padding-right: 0px;
> font-family: "Times New Roman", Times, serif;
> font-size: medium;
> color: #000000;
> }
> .maincontent p{
> margin-top: 2px;
> margin-right: 10px;
>
> }
> .rightsidebar {
> font-size: small;
> background-color: #DEEBE4;
> text-align: center;
> float: right;
> width: 250px;
> margin-top: 10px;
> margin-left: 20px;
> border: thick solid #941238;
> font-family: Arial, Helvetica, sans-serif;
> padding: 10px;
>
> }
> .leftbox {
> font-size: small;
> font-style: italic;
> color: #336600;
> background-color: #DEEBE4;
> text-align: center;
> clear: both;
> width: 300px;
> margin-top: 50px;
> border: thin solid #941238;
> font-family: Arial, Helvetica, sans-serif;
> padding: 10px;
> }
> .footer {
> font-size: small;
> margin: 100px;
> font-family: Geneva, Arial, Helvetica, sans-serif;
> font-style: normal;
> }
> .container {
> width: 90%;
> margin: 0px auto;
> }
> .clear {
> font-size: 1px;
> line-height: 0px;
> clear: both;
> height: 0px;
> }
> .event {
> font-size: 24px;
> font-weight: bold;
> color: #00493E;
> }
> .upcomingdate {
> font-size: 20px;
> color: #990134;
> font-weight: bold;
> font-family: Arial, Helvetica, sans-serif;
> }
>
> .eventitem {
> font-size: 18px;
> color: #000000;
> font-weight: bold;
> margin: 0px;
> }
> .eventlink {
> font-size: 14px;
> font-style: italic;
> margin: 0px;
> }
> .smallboxhead {
> font-size: large;
> color: #00493E;
> font-style: normal;
> font-weight: bold;
> }
> .companyname {
> font-family: Verdana, Arial, Helvetica, sans-serif;
> font-size: small;
> font-style: italic;
> color: 990134;
> }
> -
I have a layout that I need help with please. The bright green panel is going to have a Flash file inserted but I need it to sit inside the detailsWrapper div, which needs to stretch to allow this to happen. The content is being generated through php modules and the details will vary in length, so I'm having difficulty styling this. I'm sure it's something obvious but I need help please!
Here's the link: http://www.designermagic.co.uk/hobarts/reapitDetails.php?clearcache=true&pagevars=1-bedroo m-property-for-sale-in-London-N22-hobrps-ALE090002Your CSS code could use some tidying up. It's kind of a mess. See details below.
http://jigsaw.w3.org/css-validator/validator?profile=css21&warning=0&uri=http%3A%2F%2Fwww. designermagic.co.uk%2Fhobarts%2FreapitDetails.php%3Fclearcache%3Dtrue%26pagevars%3D1-bedro om-property-for-sale-in-London-N22-hobrps-ALE090002
These statements are redundant.
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, {
margin: 0;
padding: 0;
border: 0;
outline: 0;
font-size: 100%;
margin: 0;
padding: 0;
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
Try changing the above code to just this. * = the universal selector.
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
outline-style:none; /**outline is not on by default so unsure why you need this**/
More on CSS Shorthand
http://www.dustindiaz.com/css-shorthand/
And you have HTML code errors but the symbols in your document are blocking the validator from giving results.
http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fwww.designermagic.co.uk%2Fhobarts %2FreapitDetails.php%3Fclearcache%3Dtrue%26pagevars%3D1-bedroom-property-for-sale-in-Londo n-N22-hobrps-ALE090002
After you fix the code errors, post back with a URL to the new page.
Nancy O.
Alt-Web Design & Publishing
Web | Graphics | Print | Media Specialists
www.alt-web.com/
www.twitter.com/altweb
www.alt-web.blogspot.com -
Could anyone help with the query below. I posted this last
friday but never
got a reply. The original message that i posted is also
below. It might be
easier to read from the bottom up.
Thanks
James
----------------------------------->
Thanks for your reply.
I've changed my code as you suggested & now the content
div is coming about
half way down the page- so were getting somewhere. There are
floated
elements so I have added the 'clearthefloats' div. There are
no absolutely
positioned elements, but I tried making the content div
position:relative
anyway but it had no effect.
I also added some text into the 'clearthefloats' div so i
could see where it
was on the page & it is halfway down the page itself,
even though it is
below the other elements in the page.
Thanks,
James
"typist" <[email protected]> wrote in
message
news:[email protected]...
> How are you positioning what is inside your contentdiv?
Are the elements
> floated?
> IE will surround your floated elements, Firefox will not
unless you put a
> non-floated element after the floated ones, and clear
it.
>
> <div class="clearthefloats"> <!--
--></div> (I just put a comment in to
> hold
> the div)
>
> div.clearthefloats {clear:both:} (look up "Stylin' with
CSS" by Charles
> Wyke-Smith for more)
>
> But if you are putting absolutely positioned elements
into your div, then
> you
> need to make your content div position:relative. This
will make the
> elements
> position in the context of the content div instead of
the body.
>
ORIGINAL MESSAGE:
>>Hi,
>>I've got a page with css controlled div's. One of
them ('content') not
>>very
>>surprisingly contains all the page elements. For some
reason though, when
>>viewed in firefox the content div does not wrap round
it's contents (the
>>bg
>>of the page has a light purple color and the content
div is white). There
>>is
>>just a thin strip of white at the top where it
begins. It looks fine in
>>ie.
>>Here's the code for the content div:
>>#content {width:760px;
>> margin:0px auto;
>> background-image:url(images/logostrip.jpg);
>> background-position:top;
>> background-repeat:no-repeat;
>> background-color:#FFFFFF;
>> padding-bottom:10px }
>>I have tried defining the height, which works in
firefox, but then in ie
>>there is about 100px space at the bottom of the
content div. For some
>>reason
>>1000px in firefox is shorter than 1000px in ie???
>>Is there anything i am missing?
>>Thanks,
>>JamesYes I have tried setting the height. It should wrap round the
whole page
content not just the graphic. I tried setting the height till
it looked
right in firefox but then in ie there was about 150px extra
at the bottom.
(this was on another page which is a lot longer). Plus if i
set the height
to be right on the homepage, the other pages will be wrong. I
would have to
use seperate style sheets, or give the div's different id's.
Surely there is a way to get the div that all the contents
are in, to simply
wrap round them.
Thanks
"Nadia : **AdobeCommunityExpert**"
<[email protected]> wrote
in message news:[email protected]...
> Setting a height of 306px on that container, revealed
the whole graphic as
> per the visual in IE.
> I did this using the FFox edit CSS tool - but it should
work.
>
> --
> Nadia
> Adobe� Community Expert : Dreamweaver
> --------------------------------------------
>
http://www.csstemplates.com.au
- CSS Templates | Free Templates
> --------------------------------------------
>
http://www.perrelink.com.au
- Web Dev
>
http://www.DreamweaverResources.com
- Dropdown Menu Templates|Tutorials
>
http://www.adobe.com/devnet/dreamweaver/css.html
> -------------------------------------------------
> "Nadia : **AdobeCommunityExpert**"
<[email protected]>
> wrote in message
news:[email protected]...
>> Is that the graphics in the #container?
>> Have you tried setting a height on that container to
the height of your
>> header image?
>>
>> --
>> Nadia
>> Adobe� Community Expert : Dreamweaver
>> --------------------------------------------
>>
http://www.csstemplates.com.au
- CSS Templates | Free Templates
>> --------------------------------------------
>>
http://www.perrelink.com.au
- Web Dev
>>
http://www.DreamweaverResources.com
- Dropdown Menu Templates|Tutorials
>>
http://www.adobe.com/devnet/dreamweaver/css.html
>> -------------------------------------------------
>> "James D" <[email protected]> wrote
in message
>> news:[email protected]...
>>> Ok,
>>>
>>> please visit
http://www.beta-design.co.uk/ivesys_home_white/home.html
to
>>> see
>>> the page.
>>>
>>> If you view it in Firefox you will see a thin
white strip at the top.
>>> This
>>> should wrap round the page contents. It works in
IE. If you cannot
>>> access
>>> the css which is in an external file then please
repost and i will paste
>>> it
>>> all into a reply.
>>>
>>> Thanks
>>>
>>>
>>>
>>>
>>>
>>> "Osgood" <[email protected]>
wrote in message
>>> news:[email protected]...
>>>> James D wrote:
>>>>
>>>>> Could anyone help with the query below.
I posted this last friday but
>>>>> never
>>>>> got a reply. The original message that i
posted is also below. It
>>>>> might be
>>>>> easier to read from the bottom up.
>>>>
>>>> Its better to link to the complete page
rather than just supplying half
>>>> the story. If you do that its going to be
easier to identify the issue.
>>>> With the little information you have
supplied its not going to be
>>>> possible.
>>>>
>>>
>>>
>>
>>
>
> -
Need help with Fancybox please
Hola
I need some help with Fancybox.
I bought this template and it came without facybox, so I thought
that this will be a great help to learn some about jQuerry, but I'm lost
Why is NOT working on my page?
I just cannot figure this out.
Can you please check my page?
http://tummytime.biz/pages/portfolio_fancy.html
I got Windows 8, Dreamweaver CC
Thanks a lot.There are a couple things that could be causing a couple browsers' collective heads to implode.
Remove the <! right before your </head> tag...
</script>
<!
</head>
<body>
You have two calls to the fancybox css file, you only need one.
Aside from that I'm not seeing any code problems jump out at me.
EDIT: Ah, didn't scroll far enough. You have more than one reference to the jquery library. Typically, only one is needed and two or more will cause them all to fail. Usually, you can use the "latest" link and cover all your bases.
If you aren't using those referenced scripts at the bottom of your page, delete them. -
Further help with sound please
further help with the sound.
i have a sound in stage channel 1 which i want to play as soon as the movies starts. and the user is able to control it by pressing the pause button
property pPaused
on beginSprite me
pPaused = 0
end
on mouseUp me
if pPaused then sound(1).play()
else sound(1).pause()
pPaused = not pPaused
end
i have other sounds in songs (2 sounds ) and nursery rhymes (4 sounds ) with the behaviour added to the buttons as below etc,
on mouseDown me
sound(5).play( member("ABCSong") )
end
on endSprite me
sound(5).stop()
end
this stops the sound playing when i leave the frame but doesn't stop the sound in the stage channel 1.
i only want to play 1 sound at a time perferly when the button is pressed and stop
could anyone please advise of how to solve this problem. only using intermediate/basic lingo as i need to understand it.
any help is much appreciated
thank youTry:
on mouseDown me
sound(1).pause()
sound(5).play( member("ABCSong") )
end
on endSprite me
sound(1).play()
sound(5).stop()
end -
Hi everybody,
I designed a calculator, and I need help with the rest of the scientific actions. I know I need to use the different Math methods, but what exactly? Also, it needs to work as an applet and application, and in the applet, the buttons don't appear in order, how can I fix that?
I will really appreciate your help with this program, I need to finish it ASAP. Please e-mail me at [email protected].
Below is the code for the calcualtor.
Thanks in advance,
-Maria
// calculator
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.border.*;
public class calculator extends JApplet implements
ActionListener
private JButton one, two, three, four, five, six, seven,
eight, nine, zero, dec, eq, plus, minus, mult, div, clear,
mem, mrc, sin, cos, tan, asin, acos, atan, x2, sqrt, exp, pi, percent;
private JLabel output, blank;
private Container container;
private String operation;
private double number1, number2, result;
private boolean clear = false;
//GUI
public void init()
container = getContentPane();
//Title
//super("Calculator");
JPanel container = new JPanel();
container.setLayout( new FlowLayout( FlowLayout.CENTER
output = new JLabel("");
output.setBorder(new MatteBorder(2,2,2,2,Color.gray));
output.setPreferredSize(new Dimension(1,26));
getContentPane().setBackground(Color.white);
getContentPane().add( "North",output );
getContentPane().add( "Center",container );
//blank
blank = new JLabel( " " );
container.add( blank );
//clear
clear = new JButton( "CE" );
clear.addActionListener(this);
container.add( clear );
//seven
seven = new JButton( "7" );
seven.addActionListener(this);
container.add( seven );
//eight
eight = new JButton( "8" );
eight.addActionListener(this);
container.add( eight );
//nine
nine = new JButton( "9" );
nine.addActionListener(this);
container.add( nine );
//div
div = new JButton( "/" );
div.addActionListener(this);
container.add( div );
//four
four = new JButton( "4" );
four.addActionListener(this);
container.add( four );
//five
five = new JButton( "5" );
five.addActionListener(this);
container.add( five );
//six
six = new JButton( "6" );
six.addActionListener(this);
container.add( six );
//mult
mult = new JButton( "*" );
mult.addActionListener(this);
container.add( mult );
//one
one = new JButton( "1" );
one.addActionListener(this);
container.add( one );
//two
two = new JButton( "2" );
two.addActionListener(this);
container.add( two );
//three
three = new JButton( "3" );
three.addActionListener(this);
container.add( three );
//minus
minus = new JButton( "-" );
minus.addActionListener(this);
container.add( minus );
//zero
zero = new JButton( "0" );
zero.addActionListener(this);
container.add( zero );
//dec
dec = new JButton( "." );
dec.addActionListener(this);
container.add( dec );
//plus
plus = new JButton( "+" );
plus.addActionListener(this);
container.add( plus );
//mem
mem = new JButton( "MEM" );
mem.addActionListener(this);
container.add( mem );
//mrc
mrc = new JButton( "MRC" );
mrc.addActionListener(this);
container.add( mrc );
//sin
sin = new JButton( "SIN" );
sin.addActionListener(this);
container.add( sin );
//cos
cos = new JButton( "COS" );
cos.addActionListener(this);
container.add( cos );
//tan
tan = new JButton( "TAN" );
tan.addActionListener(this);
container.add( tan );
//asin
asin = new JButton( "ASIN" );
asin.addActionListener(this);
container.add( asin );
//acos
acos = new JButton( "ACOS" );
cos.addActionListener(this);
container.add( cos );
//atan
atan = new JButton( "ATAN" );
atan.addActionListener(this);
container.add( atan );
//x2
x2 = new JButton( "X2" );
x2.addActionListener(this);
container.add( x2 );
//sqrt
sqrt = new JButton( "SQRT" );
sqrt.addActionListener(this);
container.add( sqrt );
//exp
exp = new JButton( "EXP" );
exp.addActionListener(this);
container.add( exp );
//pi
pi = new JButton( "PI" );
pi.addActionListener(this);
container.add( pi );
//percent
percent = new JButton( "%" );
percent.addActionListener(this);
container.add( percent );
//eq
eq = new JButton( "=" );
eq.addActionListener(this);
container.add( eq );
//Set size and visible
setSize( 190, 285 );
setVisible( true );
public static void main(String args[]){
//execute applet as application
//applet's window
JFrame applicationWindow = new JFrame("calculator");
applicationWindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
//applet instance
calculator appletObject = new calculator();
//init and start methods
appletObject.init();
appletObject.start();
} // end main
public void actionPerformed(ActionEvent ae)
JButton but = ( JButton )ae.getSource();
//dec action
if( but.getText() == "." )
//if dec is pressed, first check to make shure there
is not already a decimal
String temp = output.getText();
if( temp.indexOf( '.' ) == -1 )
output.setText( output.getText() + but.getText() );
//clear action
else if( but.getText() == "CE" )
output.setText( "" );
operation = "";
number1 = 0.0;
number2 = 0.0;
//plus action
else if( but.getText() == "+" )
operation = "+";
number1 = Double.parseDouble( output.getText() );
clear = true;
//output.setText( "" );
//minus action
else if( but.getText() == "-" )
operation = "-";
number1 = Double.parseDouble( output.getText() );
clear = true;
//output.setText( "" );
//mult action
else if( but.getText() == "*" )
operation = "*";
number1 = Double.parseDouble( output.getText() );
clear = true;
//output.setText( "" );
//div action
else if( but.getText() == "/" )
operation = "/";
number1 = Double.parseDouble( output.getText() );
clear = true;
//output.setText( "" );
//eq action
else if( but.getText() == "=" )
number2 = Double.parseDouble( output.getText() );
if( operation == "+" )
result = number1 + number2;
else if( operation == "-" )
result = number1 - number2;
else if( operation == "*" )
result = number1 * number2;
else if( operation == "/" )
result = number1 / number2;
//output result
output.setText( String.valueOf( result ) );
clear = true;
operation = "";
//default action
else
if( clear == true )
output.setText( "" );
clear = false;
output.setText( output.getText() + but.getText() );Multiple post:
http://forum.java.sun.com/thread.jsp?forum=31&thread=474370&tstart=0&trange=30 -
Help with css 3 column layout with background
So I'm really not much of a web designer and usually deal in
print but a friend wanted help with her site so I'm taking a crash
course in css. so I was wondering if anyone a little more web savvy
than I can spot why my sites background Is sliding around.
this is the site as it
stands
this is the
main css i found a site to generate the codes to get around browser
specific glitches
what
I see in Safari
what
i see in firefox
what
background should look like
any help would be greatly appreciated thanksPeter Llamas posted in macromedia.dreamweaver:
> So I'm really not much of a web designer and usually
deal in print
> but a friend wanted help with her site so I'm taking a
crash
> course in css. so I was wondering if anyone a little
more web
> savvy than I can spot why my sites background Is sliding
around.
>
http://whiskeylemonade.x10hosting.com
I have no idea what you mean by "sliding around", but could
it have
something to do with your missing old_break.css file?
http://whiskeylemonade.x10hosting.com/css/old_break.css
HTTP/1.x 404 Not Found
Mark A. Boyd
Keep-On-Learnin' :) -
I'm having a hard time understanding all of the options and patterns for indirection. Here is what I would like to accomplish: I have three tables represented by Parent and Child classes joined by a ParentChildJoin class. I am instantiating the join class because that table also holds the ordering attribute. I would like to be able to instantiate all of the Parent objects without any of the Join or Child objects. Then when I ask a Parent for its Join objects, I would like to get all of the Join and Child objects for that Parent, in order, and as efficiently as possible, preferably in one trip to the database. It appears that with Indirection, 'addBatchReadAttribute', and so forth I should be able to accomplish this, but I would like some help with the details, please.
Thanks!Please let me know if this is the best approach. I'll use this picture to illustrate my example:
|----------| |----------| |----------|
| |1 A *| |* B 1| |
| |--------->| |<---------| |
| Parent | | PCJoin | | Child |
| |<---------| |--------->| |
| |1 C 1| |1 D 1| |
|----------| |----------| |----------|If I use Indirection on all the relations (A,B,C, and D), then I can load all of the Parent objects with one query, when I access relation A another query is triggered to populate the collection of PCJoin objects, and then as I iterate through those and access relation D, another query is issued for each child. This situation is 2+N (or 'big oh' N), which is what I wanted to avoid.
So now I have A and B marked as Indirect and checked 'Use Batch Reading' on all four relations. What appears to be happening now is one query for the Parent, then when I access relation A, I get one query for the PCJoin objects, and an additional query each for the Parent and Child objects related to those, for a total of 4 queries (or 'big oh' 1). Much better.
It seems ideally one could get away with two queries, but I would like to be able to have this behavior whichever end of the join I start at, so I just want to verify that I've done the best I can (and also to provide an example, in case anyone else had the same question.) -
Help with CSS modifications...
Hi!
Finally got this up online for temporary testing. Here are
the items I'd like to modify...not sure how to tweak the code/css.
1) for starters, the links on the left hand continously move
down when I hit return in order to add more content on the page.
I'd like for everything in the left hand panel to be completely
static, and so the links fit into that transparency block within
the background image. (they are in a table now, before I had them
outside of a table, but I had a difficulty controlling them) When
we correct these to move up, the contact phone #, etc, will move up
where they should be positioned as well.
2) if you click on one of the links, the remainder of the
links all receive the 'visited' state visual; it's reading as one
cohesive element. That should not be, as they are independent.
3) I'm trying to control the "join our mailing list" to move
up into the sign up box, and in turn, this will bring up my main
paragraph closer to the top of this cell.
As you will see, I'm attempting to control this with CSS as
much as I can.
Thank you for your help; I really appreciate it!
www.fasttag.com/prestige-lane-testing-phase> 1) for starters, the links on the left hand continously
move down when I
> hit
> return in order to add more content on the page. I'd
like for everything
> in the
> left hand panel to be completely static, and so the
links fit into that
> transparency block within the background image. (they
are in a table now,
> before I had them outside of a table, but I had a
difficulty controlling
> them)
> When we correct these to move up, the contact phone #,
etc, will move up
> where
> they should be positioned as well.
They are moving because a) they are in a table that is nested
in a table
cell, b) the table cell in which that table is nested has no
vertical
alignment specified, c) with no vertical alignment specified,
you get the
default, which is MIDDLE, and d) as the outer table grows in
height, the
middle point of the cell in which the navigation table is
nested also
migrates lower.
The solution is to assign the CSS style vertical-align:top to
td.navlinks.
> 2) if you click on one of the links, the remainder of
the links all
> receive
> the 'visited' state visual; it's reading as one cohesive
element. That
> should
> not be, as they are independent.
This is because they are all linking to the same target.
Visit one, and all
become visited.
<tr>
<td><a href="
http://www.fasttag.com">FastTag</a></td>
</tr>
<tr>
<td><a href="
http://www.fasttag.com">Greenlight
Keycard</a></td>
</tr>
<tr>
<td><a href="
http://www.fasttag.com">Pocket
Concierge</a></td>
</tr>
<tr>
<td><a href="
http://www.fasttag.com">Other
Hotel Products</a></td>
> 3) I'm trying to control the "join our mailing list" to
move up into the
> sign
> up box, and in turn, this will bring up my main
paragraph closer to the
> top of
> this cell.
The " " is not a layout tool. Don't use it as if it
were -
<h1
class="signup"> SIGN
UP!</h1>
If you want that content spaced over from the left, use a
padding-left style
on the .signup class.
Do not use background-attachment on that <h1> -
.signup {
height: 50px;
width: 99px;
border: 1px solid #C5C19D;
margin-top: 20px;
margin-left: 420px;
margin-right: 20px;
font-family: Verdana, Arial, Helvetica, sans-serif;
color: #591F00;
font-size: 13px;
background-image: url(images/signup-gradient.jpg);
background-repeat: repeat-y;
background-position: 10px;
background-attachment: fixed;
Replace your markup for that <h1> and <td> with
this -
<td width="546" height="261" valign="top"><h1
class="signup"
style="padding-left:10px;width:89px;">SIGN UP!<br>
<span class="joinmailinglist"
style="margin-left:0;">Join our
<br>mailing list</span></h1>
Finally, validate your page, and fix the errors. You have
table heights,
for example....
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
==================
"r_tist" <[email protected]> wrote in
message
news:[email protected]...
> Hi!
>
> Finally got this up online for temporary testing. Here
are the items I'd
> like
> to modify...not sure how to tweak the code/css.
>
> 1) for starters, the links on the left hand continously
move down when I
> hit
> return in order to add more content on the page. I'd
like for everything
> in the
> left hand panel to be completely static, and so the
links fit into that
> transparency block within the background image. (they
are in a table now,
> before I had them outside of a table, but I had a
difficulty controlling
> them)
> When we correct these to move up, the contact phone #,
etc, will move up
> where
> they should be positioned as well.
>
> 2) if you click on one of the links, the remainder of
the links all
> receive
> the 'visited' state visual; it's reading as one cohesive
element. That
> should
> not be, as they are independent.
>
> 3) I'm trying to control the "join our mailing list" to
move up into the
> sign
> up box, and in turn, this will bring up my main
paragraph closer to the
> top of
> this cell.
>
> As you will see, I'm attempting to control this with CSS
as much as I can.
>
> Thank you for your help; I really appreciate it!
> www.fasttag.com/prestige-lane-testing-phase
>
>
>
Maybe you are looking for
-
I can't upload photos to facebook from the photo library after upgrading to iOS 8
AFter updating ios8 i can't upload photos from photo library to fcebook..even i can't upload photos with safari browser...what can i do now??
-
SCCM 2007 component status critical
Hi, i am using sccm 2007 sp1as a primary site, sql 2005 wit cu4, wsus 3.0, on same server 2008 sp2. Few days ago i came to know that sccm console is not opening well so i checked the logs and found at sql database is showqing in suspact mode. So i
-
Failed to call Oracle JDBC OCI driver
Hi - there, I have just loaded JDBC classes for Oracle 8.0.5, which is running on Sun Solaris. The Path setup for this driver is CLASSPATH=$ORACLE_HOME/jdbc/lib/classes111.zip LIBRARY_PATH=$ORACLE_HOME/jdbc/lib:$ORACLE_HOME/lib. But I am not able to
-
TS4079 How can we make Siri to understand more about the history of our house?
I would like to know what the historical buildings that has been remodeled to look like before they got remodeled, and I would like to know when they were built actually.
-
Through JDev simple SCM Operations fails like Check in check out.
Hi Friends, I am using Oracle 9i Jdeveloper version 9.0.3.5 (Build 1437) with SCM Support Version 9.0.3.11.92. I can successfully connect to ARCS. But when I try to dop any operation(lock/check out/check in) on a file I get the following error: Inval