Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > A Style Sheet Question

Reply
Thread Tools

A Style Sheet Question

 
 
Arondelle
Guest
Posts: n/a
 
      07-03-2004
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

 
Reply With Quote
 
 
 
 
Neal
Guest
Posts: n/a
 
      07-03-2004
On Sat, 03 Jul 2004 17:17:37 GMT, Arondelle <(E-Mail Removed)>
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.
 
Reply With Quote
 
 
 
 
Arondelle
Guest
Posts: n/a
 
      07-03-2004
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. )

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

 
Reply With Quote
 
Neal
Guest
Posts: n/a
 
      07-03-2004
On Sat, 03 Jul 2004 19:03:15 GMT, Arondelle <(E-Mail Removed)>
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. )
>
> 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.
 
Reply With Quote
 
Arondelle
Guest
Posts: n/a
 
      07-03-2004
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. )

> 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.


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.

> [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.


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

Arondelle
--
================================================== =========
To email me, empty the pond with a net

 
Reply With Quote
 
Spartanicus
Guest
Posts: n/a
 
      07-03-2004
Arondelle <(E-Mail Removed)> 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
 
Reply With Quote
 
Lois
Guest
Posts: n/a
 
      07-03-2004
"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. )

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



 
Reply With Quote
 
Arondelle
Guest
Posts: n/a
 
      07-03-2004
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 ****ed 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

 
Reply With Quote
 
Jeff Thies
Guest
Posts: n/a
 
      07-03-2004
> 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
>



 
Reply With Quote
 
Arondelle
Guest
Posts: n/a
 
      07-03-2004
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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Style sheet question Zach ASP .Net 3 06-21-2012 03:17 AM
Content Page specific style style sheet rshillington@gmail.com ASP .Net 0 07-14-2006 03:45 PM
Simple style sheet / ASP question Roy ASP .Net 1 08-02-2005 03:00 PM
name space style sheet transform question bjam XML 3 04-28-2005 01:47 PM
XML to Excel Style Sheet Question (Newbie) Kevin XML 0 07-31-2003 02:50 AM



Advertisments