Pixeltor
Dec 23 2008, 10:52 PM
When I create a site there is a default page called "index" created, and when i enter my website address into my browser it automatically goes to "index", how do I set it to go to a different page on visitation?
thanks - Pixeltor
Jetteh22
Dec 24 2008, 02:50 AM
Umm, I'm not even sure if that's possible because I can't figure out any reason why anybody would want it going to a different page other than the index page - that's bound to create confusion.
If you -really- don't want it going to index, use a redirect script..
Go into the default index page and clear it out, leaving only the needed tags (html, head, title, body, and closing tags).. Then add this:
CODE
<script type="text/javascript">
<!--
window.location = "URL YOU WANT IT TO GO TO GOES HERE"
//-->
</script>
Pixeltor
Dec 24 2008, 06:38 PM
Yeah, I have my whole website built on my pc, and I named my homepage Home.html so all the links are linked to that page, thanks though the script worked.
MrTouz
Dec 24 2008, 06:48 PM
I dunno if the script will work if people have Javascript Disabled. I never tested it, never tried it.. never knew... but just because i dunno i don't use JS for redirection but META tags
CODE
<META http-equiv="refresh" content="2; URL=http://www.ASpamSite.com/">
content = is the time in seconds
url = is the link to your new page aka
http://www.mysite.com/homE.html
Pixeltor
Dec 24 2008, 07:14 PM
what are the pros and cons of using a META tag instead?
Jetteh22
Dec 24 2008, 10:41 PM
Use the meta tag one. Thanks alot MrTouz - I forgot all about that one!
The pros are that even if someone has javascript disabled in their browser they will still redirect.
You can clear the # out and just put content="URL=http://ASpamSite.com" instead, it will automatically redirect, instead of using seconds.
MrTouz
Dec 25 2008, 09:10 PM
i usually set it to 0, tho i never use it

i love my index.html
Luke
Dec 26 2008, 04:48 AM
Just to add to the discussion, if you have access to change your httpd.conf file than you can add any filename you want under DirectoryIndex to make a new index page.
CODE
DirectoryIndex index.html index.txt default.php start.htm
but stick with the meta tag, it works fine for what you need.
Pixeltor
Dec 26 2008, 10:27 PM
thanks, the meta tag works great, Some day I think i'll rename 'er to index and painfully search through the html for any links to "Home.html". but for the meanwhile it certainly does the job.
thanks!
Luke
Dec 26 2008, 11:20 PM
I think that'd be smarter to replace the home.html with index... many text editors have find and replace functions that you can search through many files at the same time... find "home.html" and replace "index.html". If you find time I'd just do that!
Pixeltor
Dec 27 2008, 01:50 AM
yeah, those are quite usefull. anyways instead of adding more data to some server in the world, I'll post my question in here. (completely off topic)
so I got my site up and running, It looks great on IE7, I showed my cousin the site since we are sort of sharing it and...... It looks like crap on firefox, safari, opera, and pretty much whatever else, basically it only looks good on IE.
so I open my css file, and start with something easy(i thought) the horizontal rule:
hr
{
color: orange;
}
why wont this make a orange hr in firefox?, i looked it up and it should be compatible with firefox.
help greatly appreciated
Luke
Dec 27 2008, 02:05 AM
First off, you can put a link here so we can see it.
When styling horizontal rules you should use the color and background color properties. It's different for ie, mozilla, and opera. the color property works for ie and background color works for opera and mozilla.
CODE
hr {
background: orange;
color: orange;
}
Pixeltor
Dec 27 2008, 02:19 AM
hr
{
background-color: orange;
color: orange;
}
wont work. Is it perhaps something more external?, I really havent got a clue, it seems so simple
Jetteh22
Dec 27 2008, 02:30 AM
Did you try simply:
<hr color="orange">
Works in IE.. Dunno about FF or any of the others, or if it's even considered valid code anymore, but that's what I've always used if I didn't use images (which is another, alternate choice)
Luke
Dec 27 2008, 02:33 AM
jetteh, i think that's deprecated. not sure but it's always a better idea to use css for all styling.
pixeltor, put the site up so we can see the problem or at least the code.
Jetteh22
Dec 27 2008, 03:02 AM
Another alternative way to do it is as follows.
It requires more coding, but.. If you can't get the HR to work for some odd reason, this should work also.
Your stylesheet:
CODE
hrule {
height: 0px;
width: 100%; // or however wide you want it
border-bottom: 2px solid orange;
}
Where you want your HR to appear, instead of <hr> do:
CODE
<div class="hrule"></div>
Luke
Dec 27 2008, 03:23 AM
That would work... but there shouldn't be problems with that code. It's either on your side (your browser) or some of your other code is somehow messing with it.
Pixeltor
Dec 27 2008, 10:17 PM
Sorry, I was busy last night
http://pixeleum.uuuq.com/Home.htmlby the way, it works in IE fine and always has, its mozzilla that wont work.
Jetteh22:
<hr color="orange">
that worked in them both, but I would rather not go through all my html changing it all. afterall a .css is supposed to help simplify things, and on most sites it says mozilla should support the css hr class.
Luke
Dec 27 2008, 11:20 PM
Gettin an error on that page.
I tested the hr in css and worked on my end in firefox, opera, and safari and it worked.... what version browsers are you using?
Pixeltor
Dec 27 2008, 11:35 PM
woh, I get an error too, I can not connect using ftp either.
I'm using IE7 and FF2.0.0.20
Luke
Dec 27 2008, 11:45 PM
What code are you using? The proper way to use it is <hr /> for valid xhtml. Just a simple mistake such as forgetting the space <hr/> will screw it up.
Pixeltor
Dec 28 2008, 12:13 AM
tried <hr>, <hr/>, <hr />
none seem to do any different.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.