I Need Help Centering An Script On My Intro Page

secondsonuk

New Member
Messages
2
Reaction score
0
Points
0
Can anyone help me?

I have just started work on a website for my band, all the pages except the intro page are centered on all different sizes of monitors except the first page. I have tried doing exactly the same thing i did to center the other pages but it still seems to go to the left on larger resolutions. 1280x1024 looks fine but anything larger than that looks messy.

i'm currently using frontpage and coffecup software to build my site and cant find a way round this problem

any help would be appreciated

the address is www.secondsonuk.x10hosting.com/index.html

please please somebody help me..

secondson

:frown:
 

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
The align attribute is deprecated. If you had searched the forum (or the web), you would have found that the proper way to align an element is to set its left and right margins to "auto" using CSS. For IE6, you need to set "text-align" on the element's parent to "center".
HTML:
<html>
<head>
  <style type="text/css">
#Parent {
  text-align: center;
}
#Child {
  margin: auto;
  width: 50%;
}
  </style>
</head>
<body>
  <div id="Parent">
    <p id="Child">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec fermentum orci nec felis. Sed sollicitudin diam id sapien. Ut libero. Vestibulum quam libero, malesuada et, ornare id, aliquet id, tellus. 
    </p>
  </div>
</body>
</html>

Frontpage produces terrible code. Better to use a text editor.

Despite what MSDN says, <bgsound> needs to be closed. Every element should be closed. <bgsound> is also MS proprietary and only supported by IE, for which I'm thankful (I don't want music that I can't stop). A more usable design is to use a media player, something that gives the user control over over playing sound. Also, compress the sound as MP3s; WAVs are too much of a drain on the network.

While you're at it, strongly consider dropping the intro page. Intro pages (and background music) are both considered design mistakes (mistakes 3 and 14). The former delays the user's access to whatever zhe's looking for while the latter doesn't give the user control over something zhe should be able to control. Music is acceptable on a page if it's a band page and, as stated earlier, you use a media player so the user can start and stop the music and change the song.

Of all browser plugins, Java is the most likely to be disabled. If you must use a plugin for content, flash is much more likely to be installed and enabled (though some people use e.g. flashblock to block flash content). A search control should not be rely on plugins; it should work when HTML is the only technology used client side.

Your choice of background image and text color for the main page clash, making it hard to read.

Most of the source code is your menu scripting. To make the pages load faster (and take advantage of caching), use CSS menus, such as Mark Wilton-Jones' Pure CSS menus or Sons of Suckerfish.

What's up with those paragraphs of nothing but non breaking spaces (&nbsp;)? Are you using them as spacers? Terrible implementation; use CSS margins and padding.
 

secondsonuk

New Member
Messages
2
Reaction score
0
Points
0
thanks mission, i'll try all that.

as for the state of the coding, i didnt know anything a week and a half ago. :)

im learning as i go and asking when i get stuck.

i may be after your advice in the future if your around.

as for the center tag thing. i have tried that and it works on all my other page barre the first page.

secondonuk
 

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
as for the state of the coding, i didnt know anything a week and a half ago. :)

Just make sure you're learning from reliable sources. They should discuss the difference between document structure (HTML) and presentation (style sheets). Avoid anything that uses tables for layout. Semantic HTML is the way to go.
 
Top