A Style Sheet Question

Discussion in 'HTML' started by Arondelle, Jul 3, 2004.

  1. Arondelle

    Arondelle Guest

    While I'm not a total neophyte, I'm not a hardcore webhead, either. So,
    I have a question, the answer to which is probably intuitively obvious
    to those who do this for a living.

    I have just spent the past three days migrating my website(s) to a new
    host. I hadn't realized how many pages I'd accumulated in my old
    webspace -- and now I have to go through the whole shebang and reset the
    URL's to the main page, and the Mailto's.

    I suppose that if I had my local version set up properly, I wouldn't
    have to do this (except for changing the mailto's), but it occurs to me
    that there might be a way to set constants for the main URL and email
    address in a style sheet. That way, the next time I have to migrate,
    I'd only have to change the style sheets, and not individual links in
    dozens of pages.

    I've looked through the CSS reference, but don't see anything there.
    Not that there isn't, mind you, but I haven't a clue where to look. I'm
    new to style sheets, BTW, and it's all still baffling.

    So, is there a way to put global constants in a style sheet?

    (Uh, and what *is* the proper syntax for URL's pointing back up the
    directory tree to the main level 2 directories away? Going down is
    easy, going back up has me totally confused. That's why I put in
    absolute addresses rather than relative ones, and gave myself such a
    headache in the first place.)

    Arondelle
    --
    ===========================================================
    To email me, empty the pond with a net
    Arondelle, Jul 3, 2004
    #1
    1. Advertising

  2. Arondelle

    Neal Guest

    On Sat, 03 Jul 2004 17:17:37 GMT, Arondelle <>
    wrote:

    > I suppose that if I had my local version set up properly, I wouldn't
    > have to do this (except for changing the mailto's), but it occurs to me
    > that there might be a way to set constants for the main URL and email
    > address in a style sheet. That way, the next time I have to migrate,
    > I'd only have to change the style sheets, and not individual links in
    > dozens of pages.
    >
    > I've looked through the CSS reference, but don't see anything there. Not
    > that there isn't, mind you, but I haven't a clue where to look. I'm new
    > to style sheets, BTW, and it's all still baffling.
    >
    > So, is there a way to put global constants in a style sheet?


    Not stylesheets. Look up SSI and PHP includes though.
    Neal, Jul 3, 2004
    #2
    1. Advertising

  3. Arondelle

    Arondelle Guest

    Neal wrote:
    >> So, is there a way to put global constants in a style sheet?

    > Not stylesheets. Look up SSI and PHP includes though.


    That would require me to rewrite all my pages entirely in a language I
    don't know, wouldn't it? I have no clue about SSI or PHP, except what I
    see in my browser address bar, and I don't know if my current host
    supports it, anyway. Most low-cost hosts don't, regardless.

    Really -- I'm just a hobbyist. If it's too complicated, I don't need to
    go there. The world is already too full of hobbyists who think they
    know stuff. :eek:)

    However, if you want to discuss the joys of PHP, I'm all ears... er... eyes.

    Arondelle
    --
    ===========================================================
    To email me, empty the pond with a net
    Shop eBay with me: http://snipurl.com/3usr
    Visit Arondelle's Dream Worlds at: http://www.arondelle.com
    Read my Blog: http://www.angelfire.com/blog/arondelle/index.html
    Arondelle, Jul 3, 2004
    #3
  4. Arondelle

    Neal Guest

    On Sat, 03 Jul 2004 19:03:15 GMT, Arondelle <>
    wrote:

    > Neal wrote:
    >>> So, is there a way to put global constants in a style sheet?

    >> Not stylesheets. Look up SSI and PHP includes though.

    >
    > That would require me to rewrite all my pages entirely in a language I
    > don't know, wouldn't it? I have no clue about SSI or PHP, except what I
    > see in my browser address bar, and I don't know if my current host
    > supports it, anyway. Most low-cost hosts don't, regardless.


    Many do, though. I am involved with a website which costs less than
    US$100/year. SSI, PHP, MySQL and a bunch of other acronyms[1].

    > Really -- I'm just a hobbyist. If it's too complicated, I don't need to
    > go there. The world is already too full of hobbyists who think they
    > know stuff. :eek:)
    >
    > However, if you want to discuss the joys of PHP, I'm all ears... er...
    > eyes.


    Well, basically, it is cool, and doing includes isn't TOO tough. A little
    more than I have time to get into here, especially if your host won't
    support SSI.

    But bottom line is that CSS doesn't do what you wish it did, there's other
    things that do that.

    HTH

    ---
    [1] Expecting the old "you can't pronounce it" malarkey from somebody.
    Don't argue these are not acronyms, they count as acronyms under all sorts
    of standard definitions.
    Neal, Jul 3, 2004
    #4
  5. Arondelle

    Arondelle Guest

    Neal wrote:
    >> ... Most low-cost hosts don't, regardless.

    >
    > Many do, though. I am involved with a website which costs less than
    > US$100/year. SSI, PHP, MySQL and a bunch of other acronyms[1].


    Can't get much cheaper than free, but I have located one hosting outfit
    that does it for $5.99 a year. Yes -- per year, not per month.
    However, I'm currently parked on a buddy's home-grown server until I
    have $5.99 I don't know what else to do with. :eek:)

    > Well, basically,
    PHP:
     is cool, and doing includes isn't TOO tough. A
    > little more than I have time to get into here, especially if your host
    > won'
    t support SSI.[/color]

    I  went and had a look at the PHP reference online.  It doesn't look any
    more difficult than, say, Javascript, and I do know Pascal, C++, and
    Visual Basic.

    However, in order for me to do any development, I'
    d have to have the PHP
    parser here on ol
    ' Nellie.  I dunno if I want to take on any more
    "stuff" at this time.  The Java compiler is sitting there collecting
    dust as it is.
    [color=blue]
    > [1] Expecting the old "you can'
    t pronounce it" malarkey from somebody.
    > Don't argue these are not acronyms, they count as acronyms under all
    > sorts of standard definitions.[/color]

    Ha! Used to work for the Military-Industrial Complex.  You want
    acronyms?  Time to swim in the alphabet soup.  :o)

    Arondelle
    --
    ===========================================================
    To email me, empty the pond with a net
    Arondelle, Jul 3, 2004
    #5
  6. Arondelle

    Spartanicus Guest

    Arondelle <> wrote:

    >I have just spent the past three days migrating my website(s) to a new
    >host. I hadn't realized how many pages I'd accumulated in my old
    >webspace -- and now I have to go through the whole shebang and reset the
    >URL's to the main page, and the Mailto's.


    [...]

    >(Uh, and what *is* the proper syntax for URL's pointing back up the
    >directory tree to the main level 2 directories away?


    .../../file.html

    >Going down is
    >easy, going back up has me totally confused. That's why I put in
    >absolute addresses rather than relative ones, and gave myself such a
    >headache in the first place.)


    There is no need to use absolute url's except for external links.

    Assume index.html links to a document in a sub-folder called "example",
    reference it like so: example/file.html , link back to index.html from
    that file by writing: ../index.html

    Do that consistently and you can move to another host without changing a
    single link.

    A special case is a link that uses the root as base: /file.html or
    /example/file.html , usage of this is restricted to sites hosted on a
    (sub)domain, it cannot be used on http://host.com/~user/ style urls as
    "/" refers to http://host.com/ and not http://host.com/~user/

    --
    Spartanicus
    Spartanicus, Jul 3, 2004
    #6
  7. Arondelle

    Lois Guest

    "Arondelle" wrote:
    : >> So, is there a way to put global constants in a style sheet?

    : Neal wrote::
    : > Not stylesheets. Look up SSI and PHP includes though.

    : That would require me to rewrite all my pages entirely in a language I
    : don't know, wouldn't it? I have no clue about SSI or PHP, except what I
    : see in my browser address bar, and I don't know if my current host
    : supports it, anyway. Most low-cost hosts don't, regardless.
    :
    : Really -- I'm just a hobbyist. If it's too complicated, I don't need to
    : go there. The world is already too full of hobbyists who think they
    : know stuff. :eek:)

    It isn't complicated at all. I don't know PHP or SSI except how to use
    includes. If I could learn that fast, so can you.

    For PHP, put something like <?php include './menu.txt'; ?> where the menu
    goes, and create one file called menu.txt (or whatever). If PHP is set up,
    it'll call that file for each page that has the include, and then you need
    to change only one file every time you change something in the menu.

    SSI is similar. The include code just looks a little different.

    If your pages have an .html extension, you'll need to set up an .htaccess
    file, but that's easy too.

    Why not find out if your web host supports PHP or SSI. I've seen a lot of
    budget ones that do.

    (A min. later) I just saw your latest post. You might want to consider a
    budget host that supports PHP to save yourself some future headaches.

    Lois
    Lois, Jul 3, 2004
    #7
  8. Arondelle

    Arondelle Guest

    Thank you all. :)

    If I'd had half a brain 5 years ago, I would have set up my local
    directory structure so that I could have used relative URL's across the
    board, and the point would be moot.

    However, I didn't, and have been too busy/lazy to go back and straighten
    it all out. In fact, it wasn't even an issue until I started hosting at
    Angelfire and couldn't get the relative URL's I originally had to work
    properly when going from directory to directory.

    (I've just bailed out of Angelfire; they just pissed me off once too
    often. I have no patience with a host that not only slathers my site
    with advertising (which is evil, but acceptable,), but also buries it
    with sidebars and other content-obscuring "enhancements.")

    I was just hoping that there would be an elegant way to deal with global
    changes -- without having to acquire new software to do it.

    Arondelle
    --
    ===========================================================
    To email me, empty the pond with a net
    Arondelle, Jul 3, 2004
    #8
  9. Arondelle

    Jeff Thies Guest

    > I was just hoping that there would be an elegant way to deal with global
    > changes -- without having to acquire new software to do it.


    You have all the pages local. Just use any decent text editor (many are
    free), open all the pages, and do a search and replace. Then reupload.

    Cheers,
    Jeff


    >
    > Arondelle
    > --
    > ===========================================================
    > To email me, empty the pond with a net
    >
    Jeff Thies, Jul 3, 2004
    #9
  10. Arondelle

    Arondelle Guest

    Jeff Thies wrote:
    >>I was just hoping that there would be an elegant way to deal with global
    >>changes -- without having to acquire new software to do it.

    >
    > You have all the pages local. Just use any decent text editor (many are
    > free), open all the pages, and do a search and replace. Then reupload.


    Well, there is that. :)

    Arondelle
    --
    ===========================================================
    To email me, empty the pond with a net
    Arondelle, Jul 3, 2004
    #10
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Roy
    Replies:
    1
    Views:
    1,631
    Eliyahu Goldin
    Aug 2, 2005
  2. Kevin
    Replies:
    0
    Views:
    494
    Kevin
    Jul 31, 2003
  3. bjam
    Replies:
    3
    Views:
    425
  4. Replies:
    0
    Views:
    506
  5. Zach

    Style sheet question

    Zach, May 24, 2012, in forum: ASP .Net
    Replies:
    3
    Views:
    612
    Michael Lalonde
    Jun 21, 2012
Loading...

Share This Page