Hexagora Forum
Hexagora Forum
Home | Profile | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Dynamic HTML Editor
 Dynamic HTML Editor
 How did you solve it?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Martin1
Super User

Netherlands
626 Posts

Posted - 11 Oct 2004 :  15:22:26  Show Profile  Reply with Quote
I have been trying for days and days to centre the page in a higher resolution than 800x600 but every css and html method I try doesn't seem to solve it.

How did you solve this in the new version. Can you tell?

Do I need to change anything in the way the css is made?

I have for instance

<div id='ldhePicture1' name='ldhePicture1' style='position:absolute;left:0px;top:0px;width:13px;height:221px;' align='left' valign='top'>
<img id='Picture1' name='Picture1' src='Images/bedrijf_picture1.gif' border='0' width='13' height='221'></img></div>
<div id='ldhePicture2' name='ldhePicture2' style='position:absolute;left:167px;top:0px;width:605px;height:221px;' align='left' valign='top'>
<img id='Picture2' name='Picture2' src='Images/bedrijf_picture2.jpg' border='0' width='605' height='221'></img></div>

I changed all the absolute positions to relative I have completely removed the position tags but still nothing.

I never encountered a problem like this and am at a totall loss and about to give up. This is the last place I try then I am going to give up[2 H:...(].

Martin


Edited by - Martin1 on 11 Oct 2004 16:44:09

jedisb
Practical

26 Posts

Posted - 11 Oct 2004 :  22:28:34  Show Profile  Visit jedisb's Homepage  Reply with Quote
You might try downloading the trial version of SiteSpinner. It allows centering as well and of course, it is already available.
Go to Top of Page

s.dav
Site Admin

Italy
3364 Posts

Posted - 12 Oct 2004 :  08:51:10  Show Profile  Visit s.dav's Homepage  Reply with Quote
There are many methods, the most compatible one that I've found is this:

you have to encapsulate all the content of your page into a div tag relative positioned as this:

<center>
<table width="the max width of the page" border=0>
<tr>
<td>
<div style="position:relative">

!!!
Here put your page!
!!!


</div>
</td>
</tr>
</table>
</center>

Regards, Davide
Go to Top of Page

Martin1
Super User

Netherlands
626 Posts

Posted - 12 Oct 2004 :  16:47:16  Show Profile  Reply with Quote
Thank you for helping me with this one s.dav!

It sort of works. There is only one issue that remains.
I made the page 772 pixels wide so I will not get a horizontal scrolbar on 800x600. In 800x600 the page doesn't align to the left border of the browser anymore.

In IE 6 it places itself about 7 pixels (half a centimeter) of the left edge, same goes for Firefox and Opera.
If I make the page for instance 800 pixels wide it still gives me this problem including the horizontal scrollbar that isn't needed.

How would I go about solving this?
In 800x600 the page should remain on the left edge and in higher resolutions the page should be centered (which it now does by the way).

Martin
Go to Top of Page

s.dav
Site Admin

Italy
3364 Posts

Posted - 13 Oct 2004 :  13:53:17  Show Profile  Visit s.dav's Homepage  Reply with Quote
I think you cannot solve this problem without using dinamic HTML but I think there isn't a reason for do that.

Regards, Davide
Go to Top of Page

Martin1
Super User

Netherlands
626 Posts

Posted - 13 Oct 2004 :  15:17:01  Show Profile  Reply with Quote
I did solve it. I did something very bad[2 H:...(] I went and downloaded sitespinner[2 H:.(] which has an awfull GUI by the way and I really don't like that program, but they had a solution that worked nicely.

They solved it by doing this:
<STYLE type=text/css>
#centered {
PADDING-LEFT: 1px; MARGIN: 0px auto; WIDTH: 780px; POSITION: relative; HEIGHT: 100%; TEXT-ALIGN: left
}
BODY {
MARGIN: 0px; WIDTH: 100%; HEIGHT: 100%; TEXT-ALIGN: center
}
</STYLE>
which goes in the head
and this:
<DIV id='centered'>
here comes the content of the site (all of it)
</div>

This seems to work. I haven't figured out why yet but I just tried it and haven't got around to figuring it out.

One thing I notice though is that in he centered id the width was set to 798 which is waaaaay wider than my site is (which is only 772). I tried setting it to 772 but this gave me the same porblem as your solution. I tried going up 1 pixel at the time and it only worked on 780. This way it al fits exactly in 800x600 without space on the left and without a horizontal scrollbar.

Don't know why yet.

Maybe a simple solution for DHE2?

Martin

Edited by - Martin1 on 13 Oct 2004 15:19:33
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Hexagora Forum © s.dav Go To Top Of Page
Snitz Forums 2000