PC Review


Reply
Thread Tools Rate Thread

CSS margins on page elements?

 
 
Murray
Guest
Posts: n/a
 
      25th Jul 2004
I have a division on a page, e.g.,

<body>
<div id="foo"></div>
</body>

and I want to position this division using CSS margins. How do I do that in
the FP2003 UI?

--
Murray


 
Reply With Quote
 
 
 
 
Jens Peter Karlsen[FP-MVP]
Guest
Posts: n/a
 
      25th Jul 2004
In properties for the div click Position. The rest should give itself.

Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.

-----Original Message-----
From: Murray [private.php?do=newpm&u=]
Posted At: 25. juli 2004 16:19
Posted To: microsoft.public.frontpage.client
Conversation: CSS margins on page elements?
Subject: CSS margins on page elements?


I have a division on a page, e.g.,

<body>
<div id="foo"></div>
</body>

and I want to position this division using CSS margins. How do I do
that in the FP2003 UI?

--
Murray


 
Reply With Quote
 
Thomas A. Rowe
Guest
Posts: n/a
 
      25th Jul 2004
Did you try inserting values in the Left, Right, Top and Bottom fields?

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)
http://www.ycoln-resources.com
FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
To assist you in getting the best answers for FrontPage support see:
http://www.net-sites.com/sitebuilder/newsgroups.asp

"Murray" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Nope - there are no margin fields there (see snap).
>
> And to get to this, I had to use FORMAT | Style > select the div id, and
> Modify.... Properties for the div only showed character-type properties.
>
> So - I can find no way to do margins on anything other than the page itself
> using the UI. Is that correct?
>
> --
> Murray
>
> "Jens Peter Karlsen[FP-MVP]" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > In properties for the div click Position. The rest should give itself.
> >
> > Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.
> >
> > -----Original Message-----
> > From: Murray [private.php?do=newpm&u=]
> > Posted At: 25. juli 2004 16:19
> > Posted To: microsoft.public.frontpage.client
> > Conversation: CSS margins on page elements?
> > Subject: CSS margins on page elements?
> >
> >
> > I have a division on a page, e.g.,
> >
> > <body>
> > <div id="foo"></div>
> > </body>
> >
> > and I want to position this division using CSS margins. How do I do
> > that in the FP2003 UI?
> >
> > --
> > Murray
> >
> >

>
>
>



 
Reply With Quote
 
Murray
Guest
Posts: n/a
 
      25th Jul 2004
Those are for absolute positioning. This is not an absolutely positioned
division.

Using those fields will give me this (for example) -

#foo { position:absolute; top:10px; left: 150px; }

but I don't want it to be absolutely positioned.

What I want is this -

#foo { position:relative; width:760px; margin:0 auto; }

so that it's centered on the page. I can get the position:relative from the
properties, but I can see no way to get at the margins. I'd like to have a
set of fields identical to the padding fields under the border category,
except for margins.

--
Murray

"Thomas A. Rowe" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Did you try inserting values in the Left, Right, Top and Bottom fields?
>
> --
> ==============================================
> Thomas A. Rowe (Microsoft MVP - FrontPage)
> WEBMASTER Resources(tm)
> http://www.ycoln-resources.com
> FrontPage Resources, WebCircle, MS KB Quick Links, etc.
> ==============================================
> To assist you in getting the best answers for FrontPage support see:
> http://www.net-sites.com/sitebuilder/newsgroups.asp
>
> "Murray" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Nope - there are no margin fields there (see snap).
> >
> > And to get to this, I had to use FORMAT | Style > select the div id, and
> > Modify.... Properties for the div only showed character-type

properties.
> >
> > So - I can find no way to do margins on anything other than the page

itself
> > using the UI. Is that correct?
> >
> > --
> > Murray
> >
> > "Jens Peter Karlsen[FP-MVP]" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > In properties for the div click Position. The rest should give itself.
> > >
> > > Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.
> > >
> > > -----Original Message-----
> > > From: Murray [private.php?do=newpm&u=]
> > > Posted At: 25. juli 2004 16:19
> > > Posted To: microsoft.public.frontpage.client
> > > Conversation: CSS margins on page elements?
> > > Subject: CSS margins on page elements?
> > >
> > >
> > > I have a division on a page, e.g.,
> > >
> > > <body>
> > > <div id="foo"></div>
> > > </body>
> > >
> > > and I want to position this division using CSS margins. How do I do
> > > that in the FP2003 UI?
> > >
> > > --
> > > Murray
> > >
> > >

> >
> >
> >

>
>



 
Reply With Quote
 
Thomas A. Rowe
Guest
Posts: n/a
 
      25th Jul 2004
Ok, then you would need to set the margins in Code View or via an external style sheet.

http://www.bluerobot.com/web/css/center1.html
http://www.w3schools.com/css/css_margin.asp

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)
http://www.ycoln-resources.com
FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
To assist you in getting the best answers for FrontPage support see:
http://www.net-sites.com/sitebuilder/newsgroups.asp

"Murray" <(E-Mail Removed)> wrote in message
news:OfNq%(E-Mail Removed)...
> Those are for absolute positioning. This is not an absolutely positioned
> division.
>
> Using those fields will give me this (for example) -
>
> #foo { position:absolute; top:10px; left: 150px; }
>
> but I don't want it to be absolutely positioned.
>
> What I want is this -
>
> #foo { position:relative; width:760px; margin:0 auto; }
>
> so that it's centered on the page. I can get the position:relative from the
> properties, but I can see no way to get at the margins. I'd like to have a
> set of fields identical to the padding fields under the border category,
> except for margins.
>
> --
> Murray
>
> "Thomas A. Rowe" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Did you try inserting values in the Left, Right, Top and Bottom fields?
> >
> > --
> > ==============================================
> > Thomas A. Rowe (Microsoft MVP - FrontPage)
> > WEBMASTER Resources(tm)
> > http://www.ycoln-resources.com
> > FrontPage Resources, WebCircle, MS KB Quick Links, etc.
> > ==============================================
> > To assist you in getting the best answers for FrontPage support see:
> > http://www.net-sites.com/sitebuilder/newsgroups.asp
> >
> > "Murray" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > Nope - there are no margin fields there (see snap).
> > >
> > > And to get to this, I had to use FORMAT | Style > select the div id, and
> > > Modify.... Properties for the div only showed character-type

> properties.
> > >
> > > So - I can find no way to do margins on anything other than the page

> itself
> > > using the UI. Is that correct?
> > >
> > > --
> > > Murray
> > >
> > > "Jens Peter Karlsen[FP-MVP]" <(E-Mail Removed)> wrote in message
> > > news:(E-Mail Removed)...
> > > > In properties for the div click Position. The rest should give itself.
> > > >
> > > > Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.
> > > >
> > > > -----Original Message-----
> > > > From: Murray [private.php?do=newpm&u=]
> > > > Posted At: 25. juli 2004 16:19
> > > > Posted To: microsoft.public.frontpage.client
> > > > Conversation: CSS margins on page elements?
> > > > Subject: CSS margins on page elements?
> > > >
> > > >
> > > > I have a division on a page, e.g.,
> > > >
> > > > <body>
> > > > <div id="foo"></div>
> > > > </body>
> > > >
> > > > and I want to position this division using CSS margins. How do I do
> > > > that in the FP2003 UI?
> > > >
> > > > --
> > > > Murray
> > > >
> > > >
> > >
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
Murray
Guest
Posts: n/a
 
      25th Jul 2004
Thanks, Thomas. I was just wondering if there were a way to get at those
settings through the FP UI.

--
Murray

"Thomas A. Rowe" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Ok, then you would need to set the margins in Code View or via an external

style sheet.
>
> http://www.bluerobot.com/web/css/center1.html
> http://www.w3schools.com/css/css_margin.asp
>
> --



 
Reply With Quote
 
Jens Peter Karlsen[FP-MVP]
Guest
Posts: n/a
 
      25th Jul 2004
Notice that the correct code for centering is margin-left: auto;
margin-right: auto;
You should also know that this wont work in IE.

Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.

-----Original Message-----
From: Murray [private.php?do=newpm&u=]
Posted At: 25. juli 2004 19:08
Posted To: microsoft.public.frontpage.client
Conversation: CSS margins on page elements?
Subject: Re: CSS margins on page elements?


Those are for absolute positioning. This is not an absolutely
positioned division.

Using those fields will give me this (for example) -

#foo { position:absolute; top:10px; left: 150px; }

but I don't want it to be absolutely positioned.

What I want is this -

#foo { position:relative; width:760px; margin:0 auto; }

so that it's centered on the page. I can get the position:relative from
the properties, but I can see no way to get at the margins. I'd like to
have a set of fields identical to the padding fields under the border
category, except for margins.

--
Murray

"Thomas A. Rowe" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Did you try inserting values in the Left, Right, Top and Bottom

fields?
>
> --
> ==============================================
> Thomas A. Rowe (Microsoft MVP - FrontPage) WEBMASTER Resources(tm)
> http://www.ycoln-resources.com FrontPage Resources, WebCircle, MS KB
> Quick Links, etc.
> ==============================================
> To assist you in getting the best answers for FrontPage support see:
> http://www.net-sites.com/sitebuilder/newsgroups.asp
>
> "Murray" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Nope - there are no margin fields there (see snap).
> >
> > And to get to this, I had to use FORMAT | Style > select the div id,


> > and Modify.... Properties for the div only showed character-type

properties.
> >
> > So - I can find no way to do margins on anything other than the page

itself
> > using the UI. Is that correct?
> >
> > --
> > Murray
> >
> > "Jens Peter Karlsen[FP-MVP]" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > In properties for the div click Position. The rest should give

itself.
> > >
> > > Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.
> > >
> > > -----Original Message-----
> > > From: Murray [private.php?do=newpm&u=]
> > > Posted At: 25. juli 2004 16:19
> > > Posted To: microsoft.public.frontpage.client
> > > Conversation: CSS margins on page elements?
> > > Subject: CSS margins on page elements?
> > >
> > >
> > > I have a division on a page, e.g.,
> > >
> > > <body>
> > > <div id="foo"></div>
> > > </body>
> > >
> > > and I want to position this division using CSS margins. How do I
> > > do that in the FP2003 UI?
> > >
> > > --
> > > Murray
> > >
> > >

> >
> >
> >

>
>



 
Reply With Quote
 
Murray
Guest
Posts: n/a
 
      25th Jul 2004
> Notice that the correct code for centering is margin-left: auto;
> margin-right: auto;


Actually, that's what I have, except in shorthand. Using margin:0 auto;
specifies the same as -

margin-top:0; margin-right:auto; margin-bottom:0; margin-left:auto;

> You should also know that this wont work in IE.


It works nicely in Moz/Netscape without further ado, and in IE5+, provided
you also have the following CSS -

body { text-align:center; }

which is then reversed with a subsequent -

#wrapper { text-align:left; }

You can see this all working nicely on my site -
http://www.great-web-sights.com.

--
Murray


"Jens Peter Karlsen[FP-MVP]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Notice that the correct code for centering is margin-left: auto;
> margin-right: auto;
> You should also know that this wont work in IE.
>
> Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.
>
>



 
Reply With Quote
 
Jens Peter Karlsen[FP-MVP]
Guest
Posts: n/a
 
      25th Jul 2004
I tried the shorthand in FireFox and it didn't work.

Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.

-----Original Message-----
From: Murray [private.php?do=newpm&u=]
Posted At: 25. juli 2004 20:26
Posted To: microsoft.public.frontpage.client
Conversation: CSS margins on page elements?
Subject: Re: CSS margins on page elements?


> Notice that the correct code for centering is margin-left: auto;
> margin-right: auto;


Actually, that's what I have, except in shorthand. Using margin:0 auto;
specifies the same as -

margin-top:0; margin-right:auto; margin-bottom:0; margin-left:auto;

> You should also know that this wont work in IE.


It works nicely in Moz/Netscape without further ado, and in IE5+,
provided you also have the following CSS -

body { text-align:center; }

which is then reversed with a subsequent -

#wrapper { text-align:left; }

You can see this all working nicely on my site -
http://www.great-web-sights.com.

--
Murray


"Jens Peter Karlsen[FP-MVP]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Notice that the correct code for centering is margin-left: auto;
> margin-right: auto;
> You should also know that this wont work in IE.
>
> Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.
>
>



 
Reply With Quote
 
Murray
Guest
Posts: n/a
 
      25th Jul 2004
Yes, it does. FF 0.8 on my web site works nicely. It also works well in
Safari, and IE5x on the Mac.

I can't say for absolute certainty, but I believe it also works in Opera.

--
Murray

"Jens Peter Karlsen[FP-MVP]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I tried the shorthand in FireFox and it didn't work.
>
> Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.
>
> -----Original Message-----
> From: Murray [private.php?do=newpm&u=]
> Posted At: 25. juli 2004 20:26
> Posted To: microsoft.public.frontpage.client
> Conversation: CSS margins on page elements?
> Subject: Re: CSS margins on page elements?
>
>
> > Notice that the correct code for centering is margin-left: auto;
> > margin-right: auto;

>
> Actually, that's what I have, except in shorthand. Using margin:0 auto;
> specifies the same as -
>
> margin-top:0; margin-right:auto; margin-bottom:0; margin-left:auto;
>
> > You should also know that this wont work in IE.

>
> It works nicely in Moz/Netscape without further ado, and in IE5+,
> provided you also have the following CSS -
>
> body { text-align:center; }
>
> which is then reversed with a subsequent -
>
> #wrapper { text-align:left; }
>
> You can see this all working nicely on my site -
> http://www.great-web-sights.com.
>
> --
> Murray
>
>
> "Jens Peter Karlsen[FP-MVP]" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Notice that the correct code for centering is margin-left: auto;
> > margin-right: auto;
> > You should also know that this wont work in IE.
> >
> > Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.
> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Page margins on Page break preview Jess Microsoft Excel Programming 1 22nd Sep 2009 10:26 PM
Enserting new page elements inside the home page Biker Teacher Microsoft Frontpage 1 22nd Apr 2008 12:11 PM
Add elements to page Miguel Dias Moura Microsoft ASP .NET 1 18th Jan 2006 05:21 PM
How to fix elements on a page? =?Utf-8?B?TWFydGlqbg==?= Microsoft Word Document Management 7 17th Aug 2005 11:56 PM
Changing margins of a page after page breaks? =?Utf-8?B?SnVyaWUgRm91cmll?= Microsoft Word Document Management 2 22nd Apr 2004 06:10 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:07 AM.