Frictional Games Forum (read-only)

Full Version: HTML Questions
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
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:

Code:
<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.
Could you post your complete code?
Mind you, this is my first time coding a site. Some of this is probably going to look horrendous to the more experienced.

Code:
<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>
I found this online:

background-position:center;

Should do the trick.
haha! Works like a charm! Fantastic Bridge, Thank you =]
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.
(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.
(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.
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 =\
Does opening it in another browser do anything different?
Pages: 1 2