Maybe a little help from someone.

General discussion about Celestia that doesn't fit into other forums.
Topic author
Don. Edwards
Posts: 1510
Joined: 07.09.2002
Age: 59
With us: 22 years 2 months
Location: Albany, Oregon

Maybe a little help from someone.

Post #1by Don. Edwards » 18.02.2005, 03:15

Hey Everyone.
I have been putting the last few touches to the new Earth Central site and come across a problem. The old sites had a fixed resolution set to 1024 in width. The new site has the same dimensions but I would like the site to adjust and center itself on the fly like most web pages do. As being a complete noob at html and web design I use a totally wisy-wig app to make my pages. So here is where I need the help. If someone could walk me through the process or I would be willing to let someone have access to my html code and graphics files so they could do it. The design I have come up with I feel is very beautiful, much better than the design I was going with in the first place. It really would be worth the effort and of course your name can go on the front page as a co-designer.
So if anyone wants a shot at this just chime in or give me a PM and we can go from there. I really don't want to post any shots of the site look and feel till it is done right. :wink:

Don. Edwards
I am officially a retired member.
I might answer a PM or a post if its relevant to something.

Ah, never say never!!
Past texture releases, Hmm let me think about it

Thanks for your understanding.

Spaceman Spiff
Posts: 420
Joined: 21.02.2002
With us: 22 years 8 months
Location: Darmstadt, Germany.

Post #2by Spaceman Spiff » 18.02.2005, 17:41

Greetings Don,

if I'm right, the good news is that the answer is very simple, even right in front of you.

You'll notice that the Celestia forum web pages centre everything. If you view the page source to look at the HTML of this very web page (there should be a menu for View, Page Source, on your browser) you should get something like this:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html dir="ltr">
<head>

[ Deletia ]

</head>
<body>
<table width="750" border="0" cellpadding="0" cellspacing="0" align="center">
<tr>
<td
valign="top" class="maintable">


[ Deletia ]


</td>
</tr>
</table>


[ Deletia ]

</body>
</html>


The very lines that I've marked red are what centre the whole page. It creates a table (<table></table>) with one row (<tr></tr>), one cell (<td></td>), and puts everything in your web page inside. The attribute align="center" for the table is the magic part. The 'width="750"' could be missed out or changed to 'width="1024"', and browsers should 'auto-fit' eveything in. The <td> should miss out the 'class="maintable"' part, as I guess you don't have such a class defined, but the valign="top" forces the table contents to butt against the top of the window so might be helpful.

When you save your page with WISYWIG, open it with a text editor and insert those red parts int he right places: immediately after the line saying "<body>" and before </body>

No need ot credit, this is not co-design. However, thank you! for considering centreing the web page. A lot of sites leave the page shoved to the left side, which makes users lean over. It's bad for the back!

Spiff.

P.s., I liked your previous web site lots, so I'm looking forward to this one!

Avatar
andersa
Posts: 64
Joined: 09.01.2005
With us: 19 years 10 months
Location: Uppsala, Sweden
Contact:

Web page design

Post #3by andersa » 18.02.2005, 18:13

Spaceman Spiff wrote:No need ot credit, this is not co-design. However, thank you! for considering centreing the web page. A lot of sites leave the page shoved to the left side, which makes users lean over. It's bad for the back!

Eh? Now that's a weird argument for centering the page contents that I hadn't seen before. Most people seem to do it because it "looks nice", which I'd say is a matter of taste. Personally I'd rather have the contents fill the full width of the page, left-justified if it's text, just as a regular book (placement of images may vary). I don't see the point of all that unused space left and right in my browser window, requiring me to scroll up and down to see everything (or even sideways, when the page is wider than my window).

But if you expect every web page to center everything simply to save your back, then I think you should rather adjust your browser than try to adjust the mindset of everybody who produces content for the Web. HTML formatting elements exist to offer flexibility to the website designer, not to compensate for poorly tailored browsers. Try narrowing down your browser window and move it slightly to the right, for instance. Or move your entire screen sideways... :wink:

"Could everybody please avoid placing important stuff in the top right corner of their web pages, as it gets obscured by my post-it notices?" :x
Anders Andersson

bh
Posts: 1547
Joined: 17.12.2002
With us: 21 years 10 months
Location: Oxford, England

Post #4by bh » 18.02.2005, 20:24

You could also have the table width as a percentage.

regards...bh.


Return to “Celestia Users”