The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> My margins disappear!
Abdurrahman
post Sep 30 2006, 07:44 AM
Post #1





Group: Members
Posts: 6
Joined: 30-September 06
Member No.: 291



Hey everyone I'm new to HTML and webdesigning stuff and I faced a problem on a host server. I made a website using FrontPage, and I set top and left page margins in the Page Properties box. When I viewed the local website on IE, it was as it should be, the margins were in place. But when I viewed the website on a server, the margins disappeared, and the page was stuck to the edge of the screen. What's the problem?
Thanks!

This post has been edited by Abdurrahman: Sep 30 2006, 07:45 AM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Sep 30 2006, 07:50 AM
Post #2


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 18,132
Joined: 9-August 06
Member No.: 6



No idea what wizards to use in FP and how. But if you post the URL to your page, we can probably tell you what's wrong with the HTML and how you should do it instead. By hand, that is. wink.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Abdurrahman
post Sep 30 2006, 08:23 AM
Post #3





Group: Members
Posts: 6
Joined: 30-September 06
Member No.: 291



Here is the site:
http://rlsonline.go2net.ws/

The shared borders shouldn't be stuck to the edge of the screen.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Sparkyg
post Sep 30 2006, 09:19 AM
Post #4


Member
***

Group: Members
Posts: 46
Joined: 29-September 06
From: Suffolk UK
Member No.: 270



Hi There

Is you view the source there is some javascript at the bottom of the code, google analytics code plus some other tracking code, which I assume is being parsed in by the web host.

Cheers

Len
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Abdurrahman
post Sep 30 2006, 12:34 PM
Post #5





Group: Members
Posts: 6
Joined: 30-September 06
Member No.: 291



Oh I see. So isn't there any workaround for that problem?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Sparkyg
post Sep 30 2006, 01:11 PM
Post #6


Member
***

Group: Members
Posts: 46
Joined: 29-September 06
From: Suffolk UK
Member No.: 270



HI There

That script inserts a bit of code that cancels out your margins

document.write("<style>");
document.write("body {");
document.write(" border:0px;");
document.write(" margin:0px;");
document.write(" padding:0px;");
.
.
.
.

so what you need to do is put everything between your body tags into a DIV

<div id="maincontent">
Content
</div>

then apply your margins to the DIV using CSS and pop this between your head tags

<style>

#maincontent {
padding:0;
margin: 50px 120px 20px 120px;
}

</style>

the margin is set as TOP,RIGHT,BOTTOM,LEFT (50px 120px 20px 120px)


you can then remove you margins that you set in the body tag

I hope this helps


cheers

Sparky
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 16th February 2019 - 06:01 AM