Jump to content

Search the Community

Showing results for tags 'css'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (Dreamweaver, Zend, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL








Donation Link

Found 42 results

  1. Hello - hope you are all well. I am creating a website for a family friend who has a shop. See preview of the site in this picture .... Currently the results are showing in one column. I want to show them in three columns in the format of: 1 2 3 4 5 6 7 8 9 etc But formatted with the picture and then the title and the border. The current code i have is.... HEAD <?php $sql = "SELECT * FROM abs_productcat WHERE catid = $catid ORDER BY catid ASC"; $can = mysql_query($sql); $catname = mysql_fetch_assoc($can); ?> BODY <?php while ($row_pro = mysql_fetch_assoc($rs_proddetails)) { ?><tr> <td><table width="243" border="0" align="left" cellpadding="15" cellspacing="0" class="sectionborders"> <tr> <td height="120" align="center"><p><strong><a href="indproducts.php?ProductID=<?php echo $row_pro['ProductID']; ?>"><img src="products/product_<?php echo $row_pro['ProductID']; ?>" alt="<?php echo $row_pro['ProductName']; ?>" height="120" class="sectionborders" border="0" /></a></strong></p> <p><strong><a href="indproducts.php?ProductID=<?php echo $row_pro['ProductID']; ?>" class="products"><?php echo $row_pro['ProductName']; ?></a></strong></p></td> </tr> </table></td> </tr> <tr> <td> </td> </tr> <?php } ?> THANK YOU FOR YOUR HELP!!!
  2. <?php $con=mysqli_connect("localhost","my_user","","shazz"); $query = mysqli_query($con,"SELECT * from posts2 order by rand() LIMIT 0,4"); $post_title ="shazz"; while ($row=mysqli_fetch_array($query)) { $post_id=$row['post_id']; $post_title=$row['post_title']; $post_date=$row['post_date']; $post_author=$row['post_author']; $post_image=$row['post_image']; $post_keywords=$row['post_keywords']; $post_content=substr($row['post_content'],0,200); } ?> the following are the errors im facing: Warning: mysqli_connect(): (HY000/1044): Access denied for user ''@'localhost' to database 'shazz' inC:\xampp\htdocs\shazz\include\main_content.php on line 3 Warning: mysqli_query() expects parameter 1 to be mysqli, boolean given inC:\xampp\htdocs\shazz\include\main_content.php on line 4 Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, null given inC:\xampp\htdocs\shazz\include\main_content.php on line 6
  3. Over the past year I started using composer and have realized that using a dependency manager keeps development and code maintenance so much easier. yay composer! I can see an equally big need to do this for front side technologies (ie: js & css) What exists for us PHP developers to help maintain that huge mess of front end stuff we need to include. Is there something to manage and minify JS/CSS that works well with the PHP environment? Thanks
  4. Is it possible to have a horizontal masonry effect? I know usually masonry is done in columns with posts shown in order vertically. However I want it to be done horizontally. I also want it to be CSS only - no JavaScript whatsoever. Is this possible? Have tried loads of things like displaying as flex, CSS columns, floating, inline-blocks and whatever.
  5. I want to have a list that has pictures on either side of each li. As the li gets bigger (more content), the images should stay in the middle of the li. I've tried numerous divs, before and after classes and gone a bit mad. Any ideas please?
  6. i can do stuff in html, php, flash, java and server developement and work for more then 8 years in different segments for webprogramming. german.
  7. Hi everyone, I usually write PHP, but this time, I need a help in CSS. I am trying to create a vertical text, Not transfer rotate degree. I want to write like this: C L A S S Thanks, Gary
  8. I can't figure out how to make this script (twitch(dot)tv) to show only online/live channels not all... Here is Javascript (function () { 'use strict'; angular .module('twitch', []) .controller('TwitchCtrl', TwitchCtrl); function TwitchCtrl($http, $scope) { $scope.streams=[]; var apiEndPoint = 'https://api.twitch.tv/kraken/streams/'; var streamers = ['Chizijs','tornis', 'elveeftw', 'piecits', 'lobosjr', 'fattypillow']; var apiSuccess = function(response, streamer){ console.log(response); var stream = response.data; stream.Name = streamer; var offline = stream.stream === null if(offline){ stream.stream = {game: 'offlines', channel:{ 'logo': '' }}; $scope.streams.push(stream); } else{ $scope.streams.unshift(stream); } console.log(stream); }; var apiError = function(response, streamer){ console.log(response); if(response.status === 422){ var stream = response.data; stream.Name = streamer; stream.stream = {game: 'Account Closed', channel:{ 'logo': ''}}; console.log(stream); $scope.streams.push(stream); } }; var setupSuccess = function(streamer){ return function(response){ return apiSuccess(response, streamer); }; }; var setupError = function(streamer){ return function(response){ return apiError(response, streamer); }; }; for(var i = 0; i < streamers.length; i++){ var onSuccess = setupSuccess(streamers[i]); var onError = setupError(streamers[i]); $http({url: apiEndPoint + streamers[i], method:'GET'}) .then(onSuccess, onError); } } })();
  9. We've got a responsive menu that when you click on an li the ul inside it is then displayed as a block (displayed as none beforehand). However you cannot then close the ul without refreshing the page or closing the menu itself. What we want is for when you click the li again, the ul inside it then displays as none. Is this possible using only CSS? (No jQuery please!!!) Any help is greatly appreciated, thanks!
  10. Hi there, I have a page of products listed on a categories page, at the minute the mysql results are split into 3 columns, but when the page opens on a larger / high res screen there is a lot of space down the right hand side of the products. I was hoping someone might be able to help me so these move when necessary. I have pasted the categories page, if anything else is needed please let me know. Hope to hear from someone. thanks. MsKazza <?php session_start(); include('Connections/adlantic.php'); ?> <!doctype html> <html> <head> <style> /* Remove the navbar's default margin-bottom and rounded borders */ .pagination { background: #0066FF; border-radius: 15px; } .rest { font:Arial, Helvetica, sans-serif; color:#0066FF; float: left; padding: 8px 8px; text-decoration: none; border: 1px solid #ddd; margin: 0 4px; transition: background-color .3s; } .rest a { color:#0066FF; text-decoration:none; transition: background-color .3s; } /* Set height of the grid so .sidenav can be 100% (adjust as needed) */ .active { font:Arial, Helvetica, sans-serif; color:#ffffff; background:#0066FF; float: left; padding: 8px 8px; text-decoration: none; border: 1px solid #ddd; margin: 0 4px; } </style> <?php $recordID = $_GET["recordID"]; $result_category = mysqli_query($con, "SELECT products.*, categories.* FROM products INNER JOIN categories ON products.category=categories.id WHERE cat_name='$recordID' AND products.product_publish='1'"); $row_category = mysqli_fetch_assoc($result_category); $metatitle= $row_category['cat_name']; $metadesc=$row_category['cat_name']; $metakeywords=$row_category['cat_name'] . "business gifts, corporate gifts, promotional products, promotional items, promotional merchandise, promotional giveaways, advertising products, sales promotion, giveaways, exhibition, conference, environmentally friendly products, eco products, printed"; include('header.php'); ?> <meta http- equiv="content-type" content="text/html;charset=UTF-8"> <script src="js/lightbox-2.6.min.js"></script> <script type="text/javascript"> $(function() { //More Button $('.more').live("click",function() { var ID = $(this).attr("id"); if(ID) { $("#more"+ID).html('<img src="moreajax.gif" />'); $.ajax({ type: "POST", url: "ajax_more.php", data: "lastmsg="+ ID, cache: false, success: function(html){ $("ol#updates").append(html); $("#more"+ID).remove(); } }); } else { $(".morebox").html('The End'); } return false; }); }); </script> <link href="css/lightbox.css" rel="stylesheet" /> <br /> <div style="clear: both;"> <br /> <div class="content-area"> <div class="page-content"> <div class="product"> <div class="product-name">Categories</div> <div class="product-info" style="background:#E5E4E4; margins:auto;"> <br /> <table border=0 width="550px" align="center" cellpadding="5" cellspacing="5" bgcolor="#FFFFFF"><tr> <?php $result = mysqli_query($con, "SELECT * FROM sub_categories WHERE cat_name='$recordID' ORDER BY subcat_name ")or die($result. "<br/><br/>".mysql_error()); $count = 0; $max = 4; while($row = mysqli_fetch_assoc($result)) { if (['$result'] > 0){ $count++; echo '<td style="padding:5px;"><img src="eCommerceAssets/images/arrow.png"> <a href="sub_category.php?recordID='.$row['id'].'" class="topbar">'.$row['subcat_name'].'</a></td>'; if($count >= $max){ //reset counter $count = 0; //end and restart echo '</tr><tr>'; } } elseif ($result = 0) { echo 'There are no Subcategories available.'; } } ?> </tr></table> <?php $recordID = $_GET["recordID"]; // find out how many rows are in the table $query = mysqli_query($con, "SELECT COUNT(*) FROM products WHERE category='$recordID' AND product_publish='1'"); $r = mysqli_fetch_array($query); $numrows = $r[0]; // number of rows to show per page $rowsperpage = 18; // find out total pages $totalpages = ceil($numrows / $rowsperpage); // get the current page or set a default if (isset($_GET['currentpage']) && is_numeric($_GET['currentpage'])) { // cast var as int $currentpage = (int) $_GET['currentpage']; } else { // default page num $currentpage = 1; } // end if // if current page is greater than total pages... if ($currentpage > $totalpages) { // set current page to last page $currentpage = $totalpages; } // end if // if current page is less than first page... if ($currentpage < 1) { // set current page to first page $currentpage = 1; } // end if // the offset of the list, based on current page $offset = ($currentpage - 1) * $rowsperpage; // get the info from the db $query = "SELECT * FROM products INNER JOIN images ON products.product_code=images.product_code WHERE category=$recordID AND product_publish='1' ORDER BY product_id ASC LIMIT $offset, $rowsperpage"; $rs_result = mysqli_query($con, $query); $cat_name = $row_category['cat_name']; // always make sure you get a valid result!!! if($result == false) { die("Query failed: ".mysqli_error().PHP_EOL.$query); } echo "<br /><br />"; echo "<b>You are viewing page " . $currentpage . " of " . $totalpages . "</b><br />"; echo "We found " . $numrows . " products <br />"; ?> <?php if ($rs_result == NULL) { echo "There are no products to display in this category"; } else { ?> <br /><br /> <table align="center" border=0 width="550px" cellpadding="5" cellspacing="5"><tr> <?php $count1 = 0; $max1 = 3; while($row1 = mysqli_fetch_assoc($rs_result)) { $prod_name = $row1['product_name']; if(strlen($prod_name)>24){ $prod_name=substr($prod_name,0,24).' ...'; } if (['$rs_result'] > 0){ $count1++; echo '<td align="center" valign="top">'; echo '<table align="center" bgcolor="#ffffff" width="160"><tr><td height="5" align="center">'; echo '</td></tr><tr><td align="center">'; echo '<a href="product.php?name='; echo $row1['slug']; echo '" class="topbar">'; echo '<img src="eCommerceAssets/images/products/'; echo $row1['product_image_big1']; echo '" width="150" height="200">'; echo '</a>'; echo '</td></tr><tr><td align="center">'; echo '<strong><a href="product.php?name='; echo $row1['slug']; echo '" class="prod-name">'; echo $prod_name; echo '</a></strong><br />'; echo '<a href="product.php?name='; echo $row1['slug']; echo '" class="button">More Info</a><br />'; echo '</td></tr></table><br /><br />'; echo '</td>'; if($count1 >= $max1){ //reset counter $count1 = 0; //end and restart echo '</tr><tr>'; } } elseif ($rs_result = 0) { echo 'There are no products available.'; } } ?> </tr></table> <?php } // close while loop echo "<br />"; /****** build the pagination links ******/ // range of num links to show $range = 3; // if not on page 1, don't show back links if ($currentpage > 1) { // show << link to go back to page 1 echo "<span class='rest'> <a href='?recordID=$recordID&currentpage=1'><<</a> </span>"; // get previous page num $prevpage = $currentpage - 1; // show < link to go back to 1 page echo "<span class='rest'> <a href='?recordID=$recordID&currentpage=$prevpage'><</a></span> "; } // end if // loop to show links to range of pages around current page for ($x = ($currentpage - $range); $x < (($currentpage + $range) + 1); $x++) { // if it's a valid page number... if (($x > 0) && ($x <= $totalpages)) { // if we're on current page... if ($x == $currentpage) { // 'highlight' it but don't make a link echo "<span class='active'> <b>$x</b> </span>"; // if not current page... } else { // make it a link echo "<span class='rest'><a href='?recordID=$recordID&currentpage=$x'>$x</a> </span>"; } // end else } // end if } // end for // if not on last page, show forward and last page links if ($currentpage != $totalpages) { // get next page $nextpage = $currentpage + 1; // echo forward link for next page echo "<span class='rest'> <a href='?recordID=$recordID&currentpage=$nextpage'>></a></span>"; // echo forward link for lastpage echo "<span class='rest'> <a href='?recordID=$recordID&currentpage=$totalpages'>>></a></span>"; } // end if /****** end build pagination links ******/ // close if ?> </div> </div> </div><!-- end of page-content --> <div class="left-side"> <?php include('menu.php'); ?> </div><!-- end of left side panel --> </div><!--end of content-area--> <br /> <div style="clear: both;"><br /> <?php include('footer.php'); ?> </div> <script src="js/cbpFWTabs.js"></script> <script> new CBPFWTabs( document.getElementById( 'tabs' ) ); </script> </body> </html>
  11. Check out http://mainlypiano.com/ and start typing in the search box ("dav" will get you several results). Notice that the search box goes below the middle light purple box. There's no z-index here to cause an issue. If one removes the relative position of the light purple box, the search results menu shows in its entirety. That's weird, isn't it? (That messes up the "favorite albums" text there, which is the point of the relative position, but lets you see the error.) Any idea why this is happening?
  12. Hi, I have the following setup: A main-page.php that is consisted of: 1) A header 2) A nav bar 3) Content (is loaded inside a <div id="dynamic-content"></div>) 4) Footer Inside the nav bar you find several options (ex. About Us, Contact Us, etc..). Lets say that the script responsible for "About Us" is called about-us.php. What i want to achieve is to load the output of about-us.php page inside the content area (aka the dynamic-content div), as soon as i press the "About Us" button (#about-us div). In order to achieve this i use the following AJAX call: $("#about-us").on('click', function(){ $.ajax({ url: "about-us.php", success: function(output){ $("#dynamic-content").html(output); } }); }); Both main-page.php and about-us.php include their own CSS and JavaScript files: main-page.js and main-page.css included in main-page.php about-us.js and about-us.css included in about-us.php THE PROBLEM I FACE: Initially the tabs inside nav bar (About us, Contact Us, etc) were stand alone pages, meaning when you clicked on the link it redirected you to a new URL (for example http://www.domain.com/about-us.php). In this case about-us.php was consisted of a head where all CSS was included, a body where all JS was included, In other words it was a complete HTML/PHP page. The page was working properly. When i tried to load this page into a div inside main-page.php, i started facing some problems. Sometimes CSS was overwritten by the CSS of Contact Us causing problems (at this point i have to mention that since about-us.php and contact-us.php were stand alone pages, sometimes we used the same classes/ids to target DOM elements). Problems started to happen with JS as well. THE QUESTION: What is the correct way to use CSS and Javascript files of about-us.php? Should i include them inside the about-us.php script or include them inside the main-page.php? Do i have to create one big CSS and one big JS file that will include all previously created CSS and JS that will target each element of each imported page? Is there another way? Thanks in advance.
  13. This question has been asked almost exactly: https://stackoverflow.com/questions/20982768/wrap-multi-column-div-around-image I apologize for asking here but the question is almost a year old, and I can't add a comment to it anyways. This is killing me. I'm trying to achieve the same thing only with 3 columns. I have to match a printed publication with no other options. I know the width of images, but the text will always be different lengths. Width of an image will always be 1 or 2 columns, height will always be different. Sometimes there is more than one image lined up vertically. Same widths, different heights. Open up any magazine and you will see what I am talking about. Column span seems to be all or 1, and I am uncomfortable with it's browser support. I'd also have to perfectly position it inside the content text, and because I want to automate things this isn't an option. Am I incorrect? View my current work here: http://www.cswea.org/mag_templates/ The code looks like this: <div style="margin-left:300px;margin-right:300px;"> <div style="margin-left:10px;margin-bottom:10px;display:inline-block;float:right;background-color:blue;width:600px;height:500px;"></div> <div style="display:inline-block;float:left;-webkit-column-count: 3;-moz-column-count: 3;column-count: 3;-webkit-column-gap: 20px;-moz-column-gap: 20px;column-gap: 20px;-webkit-column-rule: 1px outset grey;-moz-column-rule: 1px outset grey;column-rule: 1px outset grey;"> <?php include("content.php"); ?> </div> </div> content.php is 4 P tags with the garbage text inside. As you see, it matches what the OP in the first link is trying to do. If I could post a follow up question/comment that isn't an answer I'd post there. If I remove the columns, the text wraps the way I want it to but it won't fly. Absolutely MUST be 3 columns wrapped around these images and I feel like I'm against a wall here. All my research and googling, or following links from that stack overflow post tells me this isn't possible. I like to believe that in the world of html and css, anything is possible. My other option is a non column divided div, but that means I would have to develop an intelligent way to divide the text up into each div so it looks natural like a magazine article. content.php will always be a list of paragraph tags filled with any length of text so getting the desired result is no simple task. Any tips tricks or hints? Is there somewhere that I can submit the need for this to those involved with what is in the next versions of CSS or HTML? I'm sure if there is that many have already submitted so maybe one more person will help? Is there an HTML5 solution I'm missing? Thank you so much for taking the time to read this! [EDIT] The PDF of the magazine I am working with is here: http://www.cswea.org/magazine/CS_Fall2014_RICH.pdf On page 24-27, the plant profile article, this is what I need to reproduce. [EDIT]
  14. Hello, I am looking for a css dev to complete a navigation menu (or replace it). I will give you the current code (static html and css) you will have to create the css on your own server. Please do not ask for me to create an environment for you to work in. PS The dev needs good English, french or dutch language skills to communicate. After the navigation menu is finished, more work for general layout is possible. thank you anatak
  15. Hello The Internet is full with Responsive design tutorials, but a could not find any helpful adaptive design tutorial, so if someone know how to create a adaptive design or a useful tutorial please help. Have a Good Day !
  16. Hello Experts, I need help on a wordpress plugin "Easy Student Results". I installed this plugin for my ITI Institute results and when entered all institution trades, courses, students separated with trades and then started adding results on the basis of trades then this plugin doesn't show results of all trades students. It only shows results of firstly created trades students results. All other trades students results are showing unavailability error. So i need your help. https://wordpress.org/plugins/easy-student-results Thank you Manish Bajpai
  17. Guest

    Get Image from CSS

    how can I use file_get_contents to: 1: detect if '#header-cover-image' is in the page, and if so.. 2: Get the URL out of background-image: url(); /* Cover image */ body.buddypress div#item-header #header-cover-image { background-image: url(https://www.mywebsite.com/wp-content/uploads/buddypress/groups/34/cover-image/cover-image.jpg); background-repeat: no-repeat; background-size: cover; background-position: center center !important; }
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.