Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


HTML Questions
Statyk Offline
Schrödinger's Mod

Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation: 241
#1
HTML Questions

So in interest and experimentation, I've been coding my own webpage for portfolio work. But one thing I HAVE noticed is a background image I have is size specific. When the window is shrunk, the words I have typed are centered, but the background image stays aligned to the left. When the window is shrunk, the text does not center with the image. What I'm wondering is if there is a way to "center" the background image so it will always be aligned with the text? And if so, how would I do that? (it should look like the background is going under the frame on the left)

Examples:
Spoiler below!

[Image: probrem_by_statyk94-d5hwb1s.jpg]


Also, After I added frames, my custom page title failed to work. Anyone know how the title can be fixed as well? It's originally written like this:

<HEADER>
<title>Statyk 3D Portfolio Page</title>
</HEADER>

Hope you can help me out here. The language is pretty simple so far, but I just don't know all the words.
10-14-2012, 07:34 PM
Find
Bridge Offline
Posting Freak

Posts: 1,971
Threads: 25
Joined: May 2012
Reputation: 128
#2
RE: HTML Questions

Could you post your complete code?
10-14-2012, 07:40 PM
Find
Statyk Offline
Schrödinger's Mod

Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation: 241
#3
RE: HTML Questions

Mind you, this is my first time coding a site. Some of this is probably going to look horrendous to the more experienced.

<HTML>

<HEADER>
<title>Statyk's Horizon Gallery</title>
<style type="text/css">
body { background-repeat: no-repeat;}
</style>
</HEADER>
<BODY bgcolor=#000000 background="images/current_projects/horizon_bg.png" >
</BODY>

<BODY text=#FFFFFF>
<CENTER>
<P><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
<a href="http://www.moddb.com/mods/horizon-amnesia-tdd-mod" target="_blank">Official ModDB Page</a>
<U><H2>Art by me for a team project of mine, known as <I>"Horizon"</I> by the <I>Timorem Team:</I></H2></U>
<BR>

</P>
<br><a href="http://media.moddb.com/images/mods/1/22/21118/Lehaven.1.png" target="_blank"><img src="http://media.moddb.com/images/mods/1/22/21118/Lehaven.1.png" width=400 height=*></a> <a href="http://media.moddb.com/images/mods/1/22/21118/stressed_valyrie_wallpaper.png" target="_blank"><img src="http://media.moddb.com/images/mods/1/22/21118/stressed_valyrie_wallpaper.png" width=400 height=*></a>

</CENTER>
</BODY>


</HTML>
(This post was last modified: 10-14-2012, 07:42 PM by Statyk.)
10-14-2012, 07:40 PM
Find
Bridge Offline
Posting Freak

Posts: 1,971
Threads: 25
Joined: May 2012
Reputation: 128
#4
RE: HTML Questions

I found this online:

background-position:center;

Should do the trick.
10-14-2012, 07:44 PM
Find
Statyk Offline
Schrödinger's Mod

Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation: 241
#5
RE: HTML Questions

haha! Works like a charm! Fantastic Bridge, Thank you =]
10-14-2012, 07:47 PM
Find
Bridge Offline
Posting Freak

Posts: 1,971
Threads: 25
Joined: May 2012
Reputation: 128
#6
RE: HTML Questions

Sorry, I totally missed your other problem. Do you mean the page title that appears in the window bar (or in the tabs in Firefox)? My HTML is really rusty but I'm pretty sure those <HEADER> tags are supposed to be <head> tags. Header is for text in the body. Your code works because CSS code can be run from anywhere I think.
(This post was last modified: 10-14-2012, 08:00 PM by Bridge.)
10-14-2012, 07:58 PM
Find
Kreekakon Offline
Pick a god and pray!

Posts: 3,063
Threads: 70
Joined: Mar 2012
Reputation: 124
#7
RE: HTML Questions

(10-14-2012, 07:58 PM)Bridge Wrote: My HTML is really rusty but I'm pretty sure those <HEADER> tags are supposed to be <head> tags. Header is for text in the body. Your code works because CSS code can be run from anywhere I think.
I just cooked up a quick, and simple HTML myself, and for me <head>, and <header> both work for displaying the title, so I think it might be something else.

[Image: Tv0YgQb.gif]
Image by BandyGrass
(This post was last modified: 10-14-2012, 08:08 PM by Kreekakon.)
10-14-2012, 08:06 PM
Find
Bridge Offline
Posting Freak

Posts: 1,971
Threads: 25
Joined: May 2012
Reputation: 128
#8
RE: HTML Questions

(10-14-2012, 08:06 PM)Kreekakon Wrote:
(10-14-2012, 07:58 PM)Bridge Wrote: My HTML is really rusty but I'm pretty sure those <HEADER> tags are supposed to be <head> tags. Header is for text in the body. Your code works because CSS code can be run from anywhere I think.
I just cooked up a quick, and simple HTML myself, and for me <head>, and <header> both work for displaying the title, so I think it might be something else.
Well, I just cooked up his HTML and actually got the title as well with both <head> and <header>, so it may be a browser issue.
10-14-2012, 08:12 PM
Find
Statyk Offline
Schrödinger's Mod

Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation: 241
#9
RE: HTML Questions

Yeah, the titles in the window bar. I had the title working earlier, but once I added frames, it's not working anymore. I changed HEADER to HEAD, but it didn't fix =\
10-14-2012, 08:12 PM
Find
Kreekakon Offline
Pick a god and pray!

Posts: 3,063
Threads: 70
Joined: Mar 2012
Reputation: 124
#10
RE: HTML Questions

Does opening it in another browser do anything different?

[Image: Tv0YgQb.gif]
Image by BandyGrass
10-14-2012, 08:15 PM
Find




Users browsing this thread: 1 Guest(s)