Jump to content

Glom

Members
  • Posts

    73
  • Joined

  • Last visited

Glom's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. Yeah IE7 sucks. It won't display my favicons. Mozilla will.But Mozilla sucks. It keep screwing up my borders and underlining. IE7 gets it right.So they both ###### in different ways.(Erm, why is the word that describes what you do to drink through a straw being bleeped out?)
  2. Glom

    Website icons

    I tried what you recommended, but I'm not seeing the icon. Does anyone else see it?
  3. Glom

    CSS buttons

    I like to use images for links in the appropriate places, but I also like links that change when you hover over them. That's difficult for images directly without using javascript.So I conjured up another way of making dynamic images. I make the link an empty container, which I manipulate in css to take the appropriate size with the desired background image.You can see it on my home page. The validation buttons at the bottom are CSS buttons.Now the question: is this a smart idea or does it cause more problems than it solves.
  4. Glom

    Website icons

    You see all over the place websites will little icons that stick in the address bar and the favourites menu for a website. How do you make one of those?
  5. Glom

    CSS buttons

    I have to check on whether anyone thinks this approach is a good or a bad idea.This page uses my new template (I junked the php stuff in the end, too complicated for my purposes). This is the CSS. The template is basically the same in structure, though slightly different in presentation and markedly different in markup.As you can see, I use a number of buttons in the sidebar and at the bottom. In the old template, these were simply images written directly into the markup the old fashioned way. <a href="blah"><img></a> The new template makes use of CSS buttons, where the link is put inside a container, that is manipulated by CSS to look the way I want. The nav buttons in the sidebar are fairly bog standard. They are simply text, made to look like a button.It's other ones that I worry about. The idea is that they should just be about the image, no text. So I made the anchors empty and used the image as the background.To prepare for when things don't work according to plan thanks to someone's browser, I did put in some link text, but shrunk it down to 1px and made it the same colour as the background image so it would disappear. The idea is that if the CSS works as advertised, you shouldn't need the text, but if the CSS doesn't work, the link becomes a straight forward text link.If the problem is that the background image isn't available, I've made the background colour distinctive so you know something is up and the title attribute will show the link's purpose when you move the cursor over it.I like it because it allows me to make dynamic image links without having to resort to javascript.This has been validated with the w3c validators, but is it a good practice?
  6. Glom

    php interim solutions

    Intriguing. Is there a similar function that returns just the file rather than its location within the web server as well?
  7. That's basically what I do now. Most styles come from the external stylesheet but the occasional page has some extra style information in the head.I was planning to continue that when I convert to php, but I was surprised to find some php sites scripting the CSS directly into the markup.
  8. Glom

    php interim solutions

    You have the story exactly. Well I was probably a bit misleading (to myself as well) by using 6 as the serial number in that example. The idea is that the serial number would be a permanent attribute of the page rather than a than position specific. It is just an identifier.I am liking the idea of using the file name as the ident though. The only thing is that I need to be sure it is fully useable for various operations such as a switch. I know in C++ a switch will only accept integer cases. It cannot use strings.Is there a function that can return the file name? Or would I still have to manually load it as a variable on the page (which isn't too much hassle since it would be non-changing)?
  9. It is obvious that when you make your website is straight XHTML, the master stylesheet should be external (if your site demands standardisation of styles of course). That's because it makes it easier to change.However, when using server scripting to construct pages, the link to the stylesheet could very well be in a file that is standard anyway. The scripting inserts the link into the finished page the client receives. If they can do that, why not cut out the middle man and just script in the css itself?The reason I ask is that I've been looking through some sources of php pages and I have discovered large stylesheets placed internally in the markup I have received. Until this, my instinct would be to script in the link rather than script in the css itself, but what I've seen makes me wonder if there is some reason to do it the other way.Is there?
  10. Glom

    php interim solutions

    As I've posted previously, I'm looking to convert my website to php. Unfortunately for me, it's taking me a while to learn all the stuff around and the stuff posters have given me in order to do it properly. The idea is to use something like XML to order the website properly as I've said before and as posters have tried to help me with.I don't see much point in converting to my more basic idea of simply using variables in each page (variables which may need changing page by page if I change the way I want to do things and variables, which may relate to others pages but must be changed manually, which is what I'm trying to avoid by using server scripting) if I'm going to have to do a reconvert once I figure out how to do it right.So I thought of a crude interim solution that would avoid the problem. I use a php switch to feed in these data. The switch would basically fulfill the role of this XML or other by providing a single point from where information relating to site organisation can be found and used.The advantage of this as I see it is that the individual pages would retain the target form: content markup with php include commands above and below to past in the works. (see below for what I mean)Now, I know using a switch is pretty amateurish, but I think it would achieve the aim of allowing me to move to php now while not forcing me to do another site overhaul when I figure out how to use all the tools properly.Does anyone else think this would not work because: It will not make the pages properly? I would still have to change every page later on when I move to XML/whatever? <!-- my current form of a php page for my site --><?php//Add many string variables such as title, description etc. If I decided to change the way I use them/add more etc, I would have to go through each page making the change./*Also, links and titles of neighbouring pages in the sequence. Say this was page 6 of the site. I would have a link to page 5 and page 7 here. Page 5 and page 7 would have string variables referring to this page. If I decided to move this page to page 11, then I would have to change this links and titles for this page, pages 5 and 7 since they now are next to each other rather than this page, and page 10 and the former page 11, not to mention menu pages.*/?><?php include("frontend.php"); /*This will contain the working that puts in the markup that goes above the content. Since all pages use it, by changing it, the whole website is changed in a single blow */ ?><!-- All the content markup --><?php include("backend.php"); //This will contain the workingthat puts in the markup that goes below the content ?> <!-- the concept for the ultimate page - much simpler --><?php$serialnumber = 6; /*With this single variable, the bookend pages can access from the database all the information they need to compose the markup and with the database being standard, it makes it easier to make sitewide changes.*/?><?php include("frontend.php"); //This will contain the working that puts in the markup that goes above the content ?><!-- All the content markup --><?php include("backend.php"); //This will contain the workingthat puts in the markup that goes below the content ?>
  11. Well when you put it like that, it's rather obvious. I want to make sure I don't over-complicate this. I think I'll leave all the stuff in the content container as a fixed markup and just php in things around it. This database will help with that. It'll make it easier if I change the page attributes I want to use. But I think trying to incorporate the content into XML is just asking to be unable to see the forest through the trees.
  12. Glom

    Indenting lists

    Here is an example of what I'm talking about. The little neutron is under the Mihama picture. It's not indenting to match the paragraphs.
  13. This is my website. It's basically like a book; a bunch of pages, divided into chapters, which can be read in a sequence, from start to finish.It's currently written in XHTML/CSS. I designed the XHTML template to give me a large degree of control through the stylesheet, but that still ultimately has limits. For a large change, such as modifying the navbar as I want to do, I would have to go through each page one by one and make the changes. Now I'm thinking about a shift over to php.The principle reasons:For a laugh. It should make changing my template easier in future. Since the template features a bunch of mostly standard markup, then the container for the content, then more mostly standard markup, I figured that I could write a single php file for the markup above and one for the markup below and then the individual pages of the site, would basically be php files with lines of php and the top and bottom instructing an include of those book end files. This way, if I wanted to, say, update the DTD, or change the navbar layout, or anything else which is standardised, I simply adjust those standard files and the whole website is updated.The complication is that things like titles, next/previous links would be inside the book end files, despite being unique to each page. That was a fairly easy problem to solve though. For titles, keywords and the like, I simply added php string variables to the individual page and the book end files have php lines to include these variables where appropriate. This has worked in trials, though it creates a weakness in that it means these variables are a limiting factor on convenient template changes.For the next/previous links, I did something similar, though it feels sloppier. I used an array to contain the link and title of the next page.So this brings up some questions: Would it be possible/sensible to create, say, an XML file that would be a database of the pages and their attributes, which would be more conveniently changeable from which the php would extract information when necessary? Since I obviously have to prepare an index page with access to all pages, could this contents page be its core, like using XSL to present an XML file? Would any of this result in having to resort to those funny "php?id=232" things you get because I really would rather have page addresses have a more "conventional look"? (It would look rather OTT for a site as small as mine.) If we are talking XML, here is what it could look like: <chapter> <chapname>Science</chapname> <page id="7"> <pagename>The atom</pagename> <filename>atom</filename> <keywords>atom, nucleus, proton, neutron, etc</keywords> <description>A primer on the basic structure of the atom and the nucleus blah blah blah</description> <updated><y>2006</y><m>10</m><d>30</d></updated> </page> <!--Then more pages etc--></chapter><!--Then more chapters etc--> If it wanted to add a new attribute to each page, it would be easier to make edits and then upload one file rather than having to go through and upload all of them. Could this be made to work with php either in the form I presented or in another form of similar intentions? You may have noticed the page id. It is basically the page number could be used for the next/previous links (since this is page 7, the server would grab the url for page 8 for the next link etc). Is this at all possible? The other complication to total controllability, is with standard practices of the content. For example, I use two types of heading in the content, which at the moment involves the simple use of h2 and h3 elements (though I am experimenting with marking the h3's with a little neutron pic). But what if I decided to jazz it up with something that would require hard coding in markup? Would it make sense to use php to create these headings by functions? Is this another job for XML? My intentions are basically to develop this new system, which would in essence be "perfect", in that it would give me all the control I would ever need without having to go making the same change to thirty pages.
  14. Glom

    Indenting lists

    Frequently, I will add images and tables to my webpages by putting them into a container, told to float either left or right. The problem is that elements pushed right by a floating left container will not have their margins add to the indentation to the container. Therefore, the markers on lists will hang over into the container.This sucks.Is there a way to sort out this margin problem?One other thing, I want to use a little image for my markers, but they tend to hang slightly above the text. Is there anyway to specify the alignment of the marker?
  15. So that first example... how does it work? I tried duplicating the CSS and didn't get anywhere.
×
×
  • Create New...