Skip to main content
Inspiring
October 31, 2007
Frage

Removing margins and borders in html

  • October 31, 2007
  • 4 Antworten
  • 516 Ansichten
Hi all,

I've been tearing my hair out for about a number of hours now.

I'm looking to remove the borders/margins from a captivate project being run in a browser. This is because the captivate file only just fits on 1024 x 768. So the border causes major hassle.

I've instructed in the <body> tag in the html to remove margins - however I still get a left hand margin in the browser when viewing. I don't have a border set in captivate and have scratched my head at the html for an age.

I've also added a javascript to the first slide to maximise browser size... however I'm just a little short in width for the full project to be viewable without scrolling.

Any help / suggestions would be appreciated.

Thanks in advance.

Rich
Dieses Thema wurde für Antworten geschlossen.

4 Antworten

Participating Frequently
October 31, 2007
I'm hoping the second inclusion of the word BODY in the code above is a typo. You can only declare the BODY element once, right after the opening bracket.

Unless you need to generate non-standard HTML to support Netscape 4 and/or IE 3 (which is HIGHLY unlikely these days), you can get away with just:

<body style="margin: 0px" ... >

where the ... is the existing code from Captivate.

Otherwise, based on the link Rick sent, the correct usage would be:

<body topmargin="0" leftmargin="0" marginwidth="0" marginheight="0" style="margin: 0px;" ... >

You really should be making this change in the Templates\Publish\scorm.htm file in the Captivate install directory. This will ensure that the code is automatically included every time you publish.
Inspiring
November 1, 2007
Hi,

Yup the double up of body was a typo... I've managed to do it with the css - seems IE7 is far fussier than 6 about using the netscape/ie4 stuff in the body.

I've also used a little bit of css to set the scroll bars to hidden.

Thanks for all your help.

Rich
Inspiring
October 31, 2007
Hi both,

Thanks for the quick repsonses and the welcome.

I'm using the <BODY TOPMARGIN=0 LEFTMARGIN=0 BODY MARGINWIDTH=0 MARGINHEIGHT=0> in the body tag. I've used this before in IE4 / 5 / 6 / 7 when working with flash content or iframes and it's always been ok for removing the margins fully.

I'm modifying html the file each time I publish at the moment to ensure these settings are there.

It does seem to reduce the margin, and totally removes the top margin... however there is still a good area reamining on the left of the swf in the browser.
Participating Frequently
October 31, 2007
Rich,

Are you modifying the published HTML file or the scorm.htm template file in the Captivate install directory?

If you're not making your changes in the template, they are being overwritten each time you publish.
Captiv8r
Legend
October 31, 2007
Hi Rich and welcome to our community

Does the link below help?

Click here

Cheers... Rick