Jump to content

Labtec

Members
  • Posts

    117
  • Joined

  • Last visited

Everything posted by Labtec

  1. Labtec

    Button Positioning

    For a start you need to put your <p> element within the <body> tag. Why have you got such a large margin on your buttons? Regards, Lab.
  2. What is your menu code? Will you be having dynamic content? I'd have one main index.php page and load in some content for the two other pages. Post us your code please. Regards, Lab.
  3. Labtec

    include problem

    Where is your test.php page located in relation to your calling script? Kind regards, Lab.
  4. Is .linka in your css meant to be .links? Regards, Lab
  5. Straight away we can see that ou have set the width with pixels and the border with em's. If you've done it with most elements, you will get unexpected results with different resolutions and/or zooming in/out. Regards, Lbb.
  6. Did you got through your size values in the end? Regards, Labby.
  7. Awesome did you change the paths to what I suggested? Kind regards, Lab,
  8. To be honest dude I've never read about .htaccess. I know people modify it though to prevent users from seeing the actual file name. For instance rather than this showing in the browser: www.your_site.co.uk/index.php it will show this: www.your_site.co.uk/Home/ or something very similar. You have to think of your file structure like a tree structure. What your doing is referencing an image from a file which is in the next directory down from where your images are, so when you include your files in faq.php, because your faq.php page is located at another level of your tructure, the HTML output of your images are referencing an image which is not there. I'd sit and do a diagram but I've only been in from work 10 minutes myself. Gimme a reply inabit and I'll sit down and help you more and explain it a bit better if you didn't understand that. (not sure it makes sense myelf) Kind regards, Labby.
  9. Hey there, It sounds like a path issue. Try referencing the images src="../images/icon/youtube.png". Notice the preceding two periods then the forward slash. That should do the trick. Kind regards, Lab.
  10. Hey dude, For one delete the <style></style> tags which are located AFTER your closing </body> tag. Place the <style> tags WITHIN your <head> tags. Also, delete your margin style on #slideshow. Does this help? Regards, Lab.
  11. What software are you using? What browser are you using? It's not moving in FF for me. Regards, Lab
  12. Can you post all your HTML and CSS please? I remember having this problem before when I would set an image with pixels but set its container element (let's say a <div>) with percentage. I can't be sure without seeing your code. Go through your code and see if you have set different size values on different elements. I have since consistently set pretty much everything to pixels and my site works great in all browsers and resolutions and even on zoom in-out. Kind regards, Lab.
  13. On any given page, you can give the same class to multiple elements, but you can only give an id to 1 element per page. For example, if you have a couple of <div>'s which are identical in every way (positioning,colors,styles and you want it that way), give them both the same class. I generally use ID's for Javascript purposes or to identify a unique element on the page which has it's own style. You can identify elements in a number of ways. For example let's say you have this HTML: <div id="head"><img src="logo.jpg" alt="Logo" /></div> There is only one image within that <div> so you could target it a number of ways in your CSS: #head img{ width: 100%; height: 100%;} This selects any image which is inside the #head div. You can also select only the images which are direct children of your #head div (any images which are directly inside the #head div for example if we put another div inside the #head div, then put an image in that div, that image would not be affected by the code below because it's not a direct child of the #head div, it's a direct child of the nested div). Notice the use of the greater than sign '>' #head > img{ width: 100%; height: 100%;} You can also use first-child to select only the very first img child of the #head div. Let's say you have 2 images inside the #head div but you only want to apply styles to the first one of those, without giving an ID. You can use: #head img:first-child{ width: 100%; height: 100%;} This applies these styles to only the very first img tag. I hope this gives you further insight into different ways to style your elements. Kind regards, Labtec.
  14. You've not really explained exactly what you want. Is D_D correct in his assumption? Can you provide us with some code to work with preferably HTML and CSS to start but again it depends on exactly what you want I suppose. Regards, Lab.
  15. On what, a <div>? Why would you want an infinite scroll? I'm not too sure as to how to get the desired effect as I've never seen a need to try. You typically set overflow to scroll which will add a scroll bar but it depends on the amount of content inside the <div> as to how much you can scroll. Regards, Labtec.
  16. Labtec

    Sessions?

    Echo your session variables in myaccount.php just after you set session_start0; <?phpsession_start();echo $_SESSION['isLoged']."<br />";echo $_SESSION['userName'];?> What does this print? Have you got error reporting turned on? Regards, Lab.
  17. Labtec

    Sessions?

    The scientist got it spot on, you're trying to start a session after HTML has been read/outputted. Do this instead: <?phpsession_start();?><html><head> <title>hello my world!!!</title></head><body>To protect any pages, place this code on top most of the page:<?php if($_SESSION['isLoged'] != 'yes' || $_SESSION['userName'] == NULL){ header("Location: login.php");exit();}else{ echo $_SESSION['isLoged']."<br />"; echo $_SESSION['userName'];}?>Hello world!! </body></html> Slightly modified your HTML. Took the <header> tag which was outside the <body> tag and added <head> opening and closing tags. Give this a try. Regards, Labtec.
  18. You can either modify your .htaccess file to allow htm/html pages to run PHP code. Or you can simply change the extension of your filename. It really depends on what will suit you. For SEO reasons, I would modify the .htaccess file on your host. If it's a new site or is still in production level I would just change file extension from .html to .php. Regards, Labtec.
  19. For example, lets say your site structure is like this: [mySite]index.htm-->[images] yourImg.jpg-->[css] styles.css--------------------------------------------- Ok, now lets say you are trying to reference an image from your HTML file, you can just write the path like so: <img src="images/yourImg.jpg" alt="alternative_text" /> NOW, let's say you are trying to reference the image, but from your styles.css file. Because your CSS file is in it's own folder at the same level as the image (in it's own folder), you can't directly write the filepath as we have done above, because if you were to do it from the CSS file, it will search the CSS folder for the directory 'images/' (which as we know doesn't exist). When you reference an image from a file which is in a folder at the same level as the images folder, you have to do this: background-image: url("../images/yourImg.jpg"); By adding the preceding '../' before the file path, you are basically telling CSS to search the whole site folder, and find the specified directory and image. Like thescientist said, writing the FULL path to the file for your system is bad because once you actually put your site live on a web host, the directories will 9 times out of 10 not match up with the filepath of your image. The best way to reference an image (if it's at any level), is to do what I have done above in the last piece of code, add the '../' before the directory. If you post me an example of your site structure, I will be able to explain it better to you pertinent to your own structure. At this moment in time I am guessing where your HTML/image are located. Hope this helps you understand a little more. Kind regards, Labtec.
  20. Labtec

    qoute form

    Just create an external CSS file which is linked in to your main page. For example: echo "<div id='qoute'>{$qoute}</div>"; Then in your stylesheet do this: #qoute{ color: #ff0000; //etc etc} Does this help at all? Regards, Lab
  21. No problem just remember; http://getfirebug.com/ should be your best friend Glad you got it working. Regards, Lab.
  22. Try putting: .navholder{float: right;text-align: center;} Post your HTML too and I'll be able to give you a more accurate answer. Regards, Lab.
  23. Where are your images located? They don't seem to be in the same folder as your HTML file..... Are they in a folder called 'images' by any chance? Regards, L2c.
  24. Take a look at this code. It's jQuery but it works pretty well. <!DOCTYPE html><html lang=en><head><meta charset="utf-8"><!-- saved from url=(0014)about:internet --><title>localhost - Viewing a Kennel</title><link rel="stylesheet" href="/css/main.css" media="screen"><script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script><script>$(function(){ $("td").on("contextmenu",function(){ $(this).text("123123"); });}); </script></head><body> <table id="test" > <tr> <td>A</td> </tr> <tr> <td>B</td> </tr> <tr> <td>C</td> </tr></table> </body></html> Hope this helps. Regards, Labtec.
×
×
  • Create New...