Forum Moderators: not2easy

Message Too Old, No Replies

Center my website whilst using SSI

         

rustypico

9:01 pm on Jul 16, 2008 (gmt 0)

10+ Year Member



HI everyone, am very new to this forum, new to SSI and CSS and have done extensive googling to try and find a solution to my problem.

OK, i am in the middle of designing a website, and i want to center the website.

In brief, the way i have designed it just now is using SSI, that is, i have flash files - a top nav, left nav, right nav, body text, footer, and have inserted each file into an .htm document and positioned each one within within their respective .htm file (probably not the best way to do it i know).

I then use SSI to include each .htm file in an .shtml file for each web page. So for example, my index.shtml page looks like this something like this:

<body>
<!--#include virtual="SSI/index/topnav_movie.htm"-->
<!--#include virtual="SSI/common/left_nav.htm"-->
<!--#include virtual="SSI/common/latest_prod.htm"-->
<!--#include virtual="SSI/index/indexhome_body.htm"-->
<!--#include virtual="SSI/common/footer.htm"-->
</body>
</html>

what i need to do either by CSS ,or other, is center my website (if possible) so that if i manually resize the browser window, the webiste adjust accordingly, but cant seem to do it.

can anyone help? thanks!

[edited by: SuzyUK at 9:30 pm (utc) on July 16, 2008]
[edit reason] Please No example URI's see charter [/edit]

4css

4:10 pm on Jul 21, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi Rustypico,
Can you supply some of your code for us?

As SuzyUK stated in her edit, if you could read the Forum charter, [webmasterworld.com] It will help you to see how to post the code for us to view for you.

Without being able to view your code it is a bit difficult to give you an answer :)

~4css!

Xapti

4:25 pm on Jul 21, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



instead of posting your PHP source code, show us what the final page looks like in HTML. If the style info isn't built into the page, make sure you include the contents of the CSS file as well.

Essentially, you need to have a div around all your content (like inside the body) with a set width, and with the property margin: 0 auto.

Maybe you just didn't include it in your post, but your MAIN html/php file (the one you showed the contents of) you should have a proper HTML DOCTYPE, so that all browsers render the page the same way (and properly). As well, it's important to include the header and title and such as well.

The HTM files you include in the main file, should not have ANY header info or body. These files will be inserted into your existing HTML, so only the "host"/parent file needs it.

Depending on the current style info and HTML markup set for your files, the current steps I mentioned (have a main wrapper with style {width:#*$!; margin 0 auto;}) may not be sufficent, but it's the general concept you want to follow, once you get the other objects working with eachtother.