Jump to content

holmedwa04

Members
  • Posts

    743
  • Joined

  • Last visited

Everything posted by holmedwa04

  1. Just thought I would post the code for you to see: <html><head><style type="text/css">body {background-color: #ffffcc;color: black;font-size: 12px;font-family: calibri, arial, sans-serif;line-height: 150%}div.gal {clear: both;border-style: solid;font-family: Calibri, arial, sans-serif;font-size: 13px;color: #000000;line-height: 120%;width: 70%;text-align: center;padding: 5px;margin: 0px auto}a.gal:link {display: inline-block;color: #990033;font-weight: bolder;padding: 5px;text-decoration: none}a.gal:visited {display: inline-block;color: #990033;font-weight: bolder;padding: 5px;text-decoration: none}a.gal:hover {display: inline-block;color: #339900;font-weight: bolder;padding: 5px;text-decoration: underline overline}a.gal:active {display: inline-block;color: #ffffcc;font-weight: bolder;padding: 5px;text-decoration: none;background-color: #990033}</style></head><body><div class="gal"><a class="gal" id="buildingbaseboardn" href="#">Building Baseboard</a> | <a class="gal" id="electronicsn" href="#">Electronics</a> |<a class="gal" id="fittingpointsmotorsn" href="#">Fitting Points Motors</a> |<a class="gal" id="generaln" href="#">General</a> |<a class="gal" id="lightingeurostarn" href="#">Lighting Eurostar</a> |<a class="gal" id="makingtrackplann" href="#">Making Trackplan</a> |<a class="gal" id="nighttimen" href="#">Night Time</a> |<a class="gal" id="preparingloftn" href="#">Preparing Loft</a> |<a class="gal" id="sceneryn" href="#">Scenery</a> |<a class="gal" id="trackcleaningn" href="#">Track Cleaning</a></div><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam rutrum neque a orci lacinia tempor venenatis turpis dignissim. Phasellus eget quam purus, pharetra fermentum magna. Nunc at condimentum diam. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Fusce tempor euismod lorem nec consectetur. Vivamus sodales.</p><p>Integer ac lacinia augue. Sed faucibus tortor at odio eleifend gravida. Nulla non justo ut magna semper venenatis a eu ligula. Nunc fringilla, felis sit amet congue dignissim, ligula metus sodales lorem, nec.</p></body></html> The simple HTML page layout is just for test purposes to make it work in an online viewer. The a.gal:active is just to show what the links will look like when you are on that page.
  2. holmedwa04

    Div width

    Surely the container div can be 100% so it will resize to the size of the browser window and then the other divs presumably float on top of the container div?So the code for the container div would be: container.div {width: 100%} And then the code for the other divs you already have.
  3. Thanks... im unable to change the padding of the links though :S I would preferably like to be able to have the background to be slightly bigger than the text to make it look like a button. I will be using it when its complete where it is probably only the one that you have selected which shows up making it highlight the page that you are on.Scratch that last one... must have been doing something silly that was making it go funny. It seems to be working fine now... not even sure why I even thought I needed to use a list... a long line of line that automatically wraps onto the next line is much easier!Im just playing around with the formatting of it now
  4. That doesn't appear to have centered the links. I mean like this: Link 1 | Link 2 | Link 3 Link 4 Kind of thing? So the line underneath the first if indeed the link stretch to more than one line goes in the center like if you were using the <center> tags.
  5. Thats kind of what I mean but I don't know it doesn't look like I was hoping it too. I mean the problem with the first div not stretching isn't too great really... the main bit is centering the links if possible?Sorry to be a pain
  6. holmedwa04

    CSS List Menu

    Dear AllI am trying to make a horizontal menu and am struggling greatly. I cant work out why the first div with a class of nav wont stretch to fit all of the navigation? And I have to put the next paragraphs inside another div with block:both set when in theory I should only need to use that on the first div.navAlso I would like to know how to centre the menu items... so that they look like centered text and when you resize the page they realign onto more than one line like they are doing but just centered instead.Also is it possible to maybe put little pipes (|) inbetween the links to make it look like they are separated?This is the code that I have made so far using the online try it editor: <html><head><style type="text/css">ul {float:left;width:100%;padding:0;margin:0;list-style-type:none}a {float:left;text-decoration:none;text-align: center;color:black;margin:5;padding:10}div.nav {padding: 5px;clear: both;background: #990033;border: 2px inset #ffffcc;font-family: calibri, arial, sans-serif;font-size: 13px;color: #ffffcc;line-height: 120%;width: 80%;text-align: center;margin: 0px auto}div {clear:both;font-family: calibri, arial, sans-serif;font-size: 16px;color: #000000;line-height: 120%}a:hover {background-color:#ffffcc;color:black}a:active {background-color:#990033;color:black}li {display:inline}</style></head><body><div class="nav"><ul><li><a href="#">Link one</a></li><li><a href="#">Link two</a></li><li><a href="#">Link three is very long</a></li><li><a href="#">Link four</a></li><li><a href="#">Link five</a></li><li><a href="#">Link six</a></li><li><a href="#">Link seven is very long</a></li><li><a href="#">Link eight</a></li></ul></div><div><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam rutrum neque a orci lacinia tempor venenatis turpis dignissim. Phasellus eget quam purus, pharetra fermentum magna. Nunc at condimentum diam. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Fusce tempor euismod lorem nec consectetur. Vivamus sodales.</p><p>Integer ac lacinia augue. Sed faucibus tortor at odio eleifend gravida. Nulla non justo ut magna semper venenatis a eu ligula. Nunc fringilla, felis sit amet congue dignissim, ligula metus sodales lorem, nec.</p></div></body></html> Any help would be greatly appreciated
  7. Ok thanks, I have done all but the second step about "insert the function to retrieve nav links within the body" where do I place this code? Along with the include function? On every page?
  8. When I put this code in: $fname = basename($_SERVER['SCRIPT_NAME']); It just shows up where ever I place it and doesn't actually do anything. Please could someone write out the code that I need? I have very little experience of PHP and so struggle to know where anything goes. Sorry to be so much bother.
  9. Thanks justsomeguy.... I have tried it with this code: <ul id="nav"><li>Navigation</ul><ul id="menu"><?php if ($fname != 'index.php') echo '<li><a class="nav" href="index.php">Home</a></li>'; ?><?php if ($fname != 'lights.php') echo '<li><a class="nav" href="lights.php">How to Make Lights</a></li>'; ?><?php if ($fname != 'archive.php') echo '<li><a class="nav" href="archive.php">News Archive</a></li>'; ?><?php if ($fname != 'about.php') echo '<li><a class="nav" href="about.php">About the Layout</a></li>'; ?><?php if ($fname != 'layout.php') echo '<li><a class="nav" href="layout.php">Track Plan</a></li>'; ?><?php if ($fname != 'news.php') echo '<li><a class="nav" href="news.php">Layout News</a></li>'; ?></ul> But with no luck... is there something that I am missing?
  10. Thanks for your reply... but that means I need to add a piece of CSS to every page... I was hoping there might be some PHP around that would find out the page you were on and then hide it maybe?
  11. This is the code that is in the navigation include file... <ul id="nav"><li>Navigation</ul><ul id="menu"><li><a class="nav" href="index.php">Home</a><li><a class="nav" href="lights.php">How to Make Lights</a><li><a class="nav" href="archive.php">News Archive</a><li><a class="nav" href="about.php">About the Layout</a><li><a class="nav" href="layout.php">Track Plan</a><li><a class="nav" href="news.php">Layout News</a></ul>
  12. holmedwa04

    Php Navigation

    Hey EveryoneI have a website and it currently uses PHP includes so that the header, footer, navigation and right pane can be edited and shown on any page. This makes life somewhat easier. But I was wondering if it was possible to get it to only display the pages you were not on...so it looks at the page you are on and then removes that from the navigation include? So if there were 4 pages... page one would have 2,3,4 page two 1,3,4 page three 1,2,4 page four 1,2,3.Any help would be greatly appreciated. Thanks in advance.N.B. I am a complete novice with PHP and have only used include functions so far!
  13. Yes! You have saved the day! Well saved me from ripping my hair out! Lol, I called it 404.html and have one in the root, one in the goathland folder and the .htaccess in the goathland folder and it works from both the domain and the URL. :)If the Host ever want to make their own custom error message mine should not interfere with theirs unless they have the same name will they? Because I have only put the .htaccess in my folder?
  14. Is there no way of setting up a conditional statement or something, so if accessed via domain use this path and if accessed by proper URL use this path? Because as I understand it the domain is a shortcut of the full URL isn't it?EDIT: I have tried an absolute path to the file and it works but it messes the search feature up by making it display funny things.
  15. My site is hosted by another site so my URL is their URL plus my folder, that is why I have used /goathland/404.html as the path. But when accessed by the domain name, it doesn't work.EDIT: When the link in the .htaccess is changed to /404.html the 404 works for access via the domain name but not via proper URL and when changed to /goathland/404.html it works for access via proper URL but not domain name. If you get what I mean?
  16. This is what is written in the .htaccess document: Obviously this works for the proper URL but not for the domain, really appreciate any help you can give, I am sure it is just something really basic that I am missing!
  17. Well I know that the path is okay when access via the absolute link, but obviously when it is access via the domain name then the link is going to be different, so what would it be when accessed via domain name and not original URL and can I use two different links in the .htaccess. If you get what I mean?
  18. Hi AllI Don't know where I should post this so I thought the best section would be general and then it could be moved if needsbe.I have created a custom 404 error message for my website and it works fine, but the only problem is it doesn't work on my new domain.The actual website address is:http://hosting.burrawcentral.org/goathlandand the custom 404 works if you go via that page but...www.goathland.co.ccit doesn't work and I can't for the life of me work out why. I have inklings but I am not sure, if you could help me with this I would be very appreciative.
  19. Ok, I would use CSS personally. I originally coded my website in tables and I came across lots of problems. The only way for me to solve them was to use CSS. I spent about a week changing my layout to CSS. And in the end it was worth it.But it really depends... if it is just a small school project then you may not be required to do anything quite so complicated. If you would like to investigate CSS you are more than welcome to view my website:www.goathland.co.ccLook at the source of it if you like. And here is a link to the topic where I changed my layout from tables to CSS if it is of any help to you:http://w3schools.invisionzone.com/index.php?showtopic=22033
  20. Yes quite right, I doubt the pages are going to be a huge size but I see what you are saying.Sorry for making such a silly topic, I just needed a reply quickly! And then it came to me.
  21. Ok, sorry will change that, do you know what code I should use to get it to stretch vertically though?EDIT: I think I may have worked it out... set the vertical repeat to none, and then set the background colour of the page to that of the bottom colour of the gradient image. This way it doesn't stretch the image This should work I think.EDIT 2:Ok this is what I have come up with... body{ background-image: url('../images/Gradient.gif');background-repeat: repeat-x;background-color: #003398}
  22. Hi AllJust a really quick one, this is the code that is used to display a background image, but when viewed on a big resolution it repeats vertically, is there any way of getting it to stretch vertically no matter how long the page is and repeat horizontally? body {background-image:url('../images/Gradient.gif');repeat-x;color: #000000;margin:0px;padding:20px;text-align:center;} Thanks in advance.
  23. Same, one of my hosts has folders like, public html, private html, cgi-bin and stuff like that, all of the webpage goes into the public html. I haven't uploaded any .txt files but I shouldn't see there being any problem, because you can uploaded files like .png, .gif, .jpg and the likes and they are not .html or .htm but they still upload fine.
  24. holmedwa04

    Color

    I used a png the other day because I had been told how good they were in a book and was most annoyed to find that the transparency on them didn't work in IE it just gave a hideous grey colour. I converted to gif and lost all of the image quality so I started again using a jpeg this time because the transparency was not needed.
  25. Sorry I still haven't got round to doing those spelling errors! Still looking for a free editor with syntax highlighting that will do spell check on witting and not code. :)I have got custom 404 and 403 error pages up and working now. Let me know what you think. You know how it works, to get the 404 just type something random in the address bar after the URL and to see the 403 error page try visiting either the images, thumbs, animations or cgi-bin folders.
×
×
  • Create New...