You are not logged in.
Announcement
#1 10/12/06 5:46pm
- soulofdarkness
- Moderator
- From: Tallinn
- Registered: 25/08/06
- Posts: 401
Ask HTML related questions here!
This is a topic were html noobs can ask their questions
And onto the first question:
If you choose an image as a background with <body background="bg.jpg">
</body> than the image will copy itself allover the page. is there a way of making this process working only for the y axis? like, making a collum at the left part of the webpage?
EDIT: Maybe we should move this topic to Offtopic?
Last edited by soulofdarkness (10/12/06 5:47pm)
I bite!
Offline
#2 10/12/06 6:46pm
Re: Ask HTML related questions here!
Yeah, there is a way - use CSS. CSS stands for cascading style sheets, and they're used to seperate the content from the display. For example, one set of web pages make up this site, but there are two different style sheets written in CSS, one for the PC display, and one for the PSP display. You can see them here and here if you're interested.
Anyway, back onto the question - simply put this code into your style sheet:
Code:
body{ background-image: url('bg.jpg'); background-repeat: repeat-y; }
See this link for help...
PSP Flash Gaming creator
Offline
#3 10/12/06 10:15pm
- soulofdarkness
- Moderator
- From: Tallinn
- Registered: 25/08/06
- Posts: 401
Re: Ask HTML related questions here!
Thanks! do i need to mark the start and end the script? like <html></html>?
I bite!
Offline
#4 10/12/06 10:20pm
- soulofdarkness
- Moderator
- From: Tallinn
- Registered: 25/08/06
- Posts: 401
Re: Ask HTML related questions here!
Ok, i found the awnser myself. If someone is interested, it starts with
<style type="text/css"> and ends with </style>
I bite!
Offline
#5 10/12/06 10:45pm
- soulofdarkness
- Moderator
- From: Tallinn
- Registered: 25/08/06
- Posts: 401
Re: Ask HTML related questions here!
Next question
Is there a way to disable java script? The website that hosts my website adds ads, thy are big and ugly (around the width of this post and walf height of it). The advert is added by a JS at the end of the Webpage. I scroll it down with <br>s but it's not ... mmm ... don't know a word... usefull? handfull? anyway, what to doo?
I bite!
Offline
#6 10/12/06 10:51pm
Re: Ask HTML related questions here!
The way that CSS usually works is with 'stylesheets'. These are seperate files to the html, allowing multiple html files to take their appearance from one file. This is good because you change one value in this file, eg for the font-size, and it changes the appearance across the whole site. Easy!
So, you create a file called whatever.css and then link your html to it by putting this into the head section of your html:
Code:
<link rel="StyleSheet" href="whatever.css" type="text/css" />
You can link as many stylesheet files as you like like this. You can add extra attributes too, for example, you can have one link with the attribute media="screen" and one with media="print" and the browser uses the print stylesheet when printing (so you can set it to not display the navigation etc)
Within the stylesheet, you do not need to start or end the code - just the fact that it is a css file will tell the html how to deal with it. The basic syntax for css is the identifier (a html tag, eg body, p, h1 etc; a class or a name). The official description of how this works is here, and it's not too hard to read...
Unfortunately i deleted all of my bookmarks for help on css a while ago because i decided i didn't need them any more, but if you just do some google searches for css help, you get loads of tutorials...
PSP Flash Gaming creator
Offline
#7 10/12/06 10:53pm
- soulofdarkness
- Moderator
- From: Tallinn
- Registered: 25/08/06
- Posts: 401
Re: Ask HTML related questions here!
that's a lot of help! thanks!
I bite!
Offline
#8 10/12/06 10:54pm
Re: Ask HTML related questions here!
Second question - you'll probably be breaking the rules of your hosting provider if you hide their ads. To be honest, easier to just get your own hosting - it's not too expensive. Domain names are about £5 for 2 years (www.123-reg.co.uk) and hosting is around £20 a year (www.dataflame.co.uk)
PSP Flash Gaming creator
Offline
#10 11/12/06 11:03am
#11 11/12/06 6:28pm
- soulofdarkness
- Moderator
- From: Tallinn
- Registered: 25/08/06
- Posts: 401
Re: Ask HTML related questions here!
Next question:
how to make a link to a particular part of a page? for example, if the page has lots of text and the page strats with paragraph 1, the link will bring you to paragraph 100.
I bite!
Offline
#12 11/12/06 8:18pm
- woodpecker106
- Hardcore Member
- From: Cardiff
- Registered: 29/04/06
- Posts: 109
- Website
Re: Ask HTML related questions here!
I think you put something like this at the place you want to jump to for example the top of the page
Code:
<a name="top"> </a>
then add this where you want to jump from, eg the bottom of the page
Code:
<a href="#top">Top of page</a>
Offline
#13 11/12/06 8:29pm
- soulofdarkness
- Moderator
- From: Tallinn
- Registered: 25/08/06
- Posts: 401
Re: Ask HTML related questions here!
Ah... i'll try...
I bite!
Offline
#14 11/12/06 10:57pm
Re: Ask HTML related questions here!
close, i think you have to use id rather than name, then use a standard hyperlink with a # then the identifier. You should be able to use this with any tag, but it's classically done with <div> tags or <h1> header tags.
If you want to go to the top of the page, you can simply point a hyperlink at #
ps. it might work with name as well, i've never tried it...
PSP Flash Gaming creator
Offline
#15 12/12/06 12:31pm
- Jeffy
- Addicted Moderator
- From: Belgium
- Registered: 26/09/06
- Posts: 402
Re: Ask HTML related questions here!
They both seem to work :p
Check it out
I've always used name so far... But I guess id is shorter.
What I like most about these anchors (that's what they're called) is that you can link to them from another page too, if you haven't found that out yet.
you can do that by linking to the page, followed by #name of your anchor
for my little test page, that's http://www.pspflashgaming.com/user_uploads/Jeffy/Rubbish/test.html#middle which means it's linked on the anchor that i named "middle", somewhere in the middle of the page.
Offline
#16 12/12/06 12:57pm
- soulofdarkness
- Moderator
- From: Tallinn
- Registered: 25/08/06
- Posts: 401
Re: Ask HTML related questions here!
Ok, name's working fine. id is good too.
I bite!
Offline
#17 13/12/06 12:13am
- Jeffy
- Addicted Moderator
- From: Belgium
- Registered: 26/09/06
- Posts: 402
Re: Ask HTML related questions here!
So... When is this website of yours ready?
Offline
#18 13/12/06 12:46pm
- soulofdarkness
- Moderator
- From: Tallinn
- Registered: 25/08/06
- Posts: 401
Re: Ask HTML related questions here!
It's not mine - i'm doing it for my friend. He's a tracer, and he needed a website for his parkour team. you can see the page coming to shape here - www.flux-crew.nm.ru, but the website is in russian, so there's realy nothing to see there.
I bite!
Offline
#19 13/12/06 8:54pm
#20 13/12/06 9:46pm
- soulofdarkness
- Moderator
- From: Tallinn
- Registered: 25/08/06
- Posts: 401
Re: Ask HTML related questions here!
Don't worry, it's not that scary
Ow, and the next question:
i want to make the webpage multi-languagde, And i was thinking of making multiple copies of a page in different languadges, but now i have an idea:
Phil, you used CSS elements for this website. I know it can be used to change fomn't sizwes, colours etc. But in he beginning, there was a sing when you visited the site from a PSP - 'you are using a PSP or something'.
So, here's the question^ is it possible to make some parts of the text apper when the firsty style in enabeled, and other - when the second one?
I bite!
Offline
#21 15/12/06 1:13am
Re: Ask HTML related questions here!
id is also better because css uses the id tag to reference objects in the page.
As for the latest question - using CSS, no. What you want to do is change the content in the web page, and CSS can't do that. You need some PHP. You could then automatically detect the language of the user and use php to display the relevant text. Check out www.php.net, it's a very good site. Ask if you need any help
PSP Flash Gaming creator
Offline
#22 15/12/06 12:59pm
- soulofdarkness
- Moderator
- From: Tallinn
- Registered: 25/08/06
- Posts: 401
Re: Ask HTML related questions here!
Right now i can't use PHP on my website - the hoster doesn't support php.
I will change it soon - pri.ee has a cheap hosting with lot's of possibilities, then i'll post
I bite!
Offline
#23 15/12/06 7:32pm