Adobe Dreamweaver Forums



Last 10 THreads :         Browser (Last Post : michel_v - Replies : 1 - Views : 2 )           »          certificate (Last Post : jkhgdkhgslkj - Replies : 2 - Views : 3 )           »          Flex with JSP (Last Post : JB2622 - Replies : 5 - Views : 6 )           »          Is there a way to extract a subset of an arraycollection (Last Post : Amy Blankenship - Replies : 4 - Views : 5 )           »          Getting Tree Item Editor to show on an Event other thanitemClick (Last Post : ericbelair - Replies : 2 - Views : 7 )           »          mxmlc - "Unable to resolve resource bundle "rpc" forlocale "en_US" (Last Post : ugrowemweschickm - Replies : 2 - Views : 6 )           »          export hidden layers error (Last Post : gelon - Replies : 0 - Views : 1 )           »          Dynamic dropdown (Last Post : idesdema - Replies : 0 - Views : 1 )           »          Re: Dynamic dropdown (Last Post : Ian Skinner - Replies : 0 - Views : 1 )           »          perform action "on save"? (Last Post : AXEmonster - Replies : 1 - Views : 6 )           »         


Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
User Info Statistics
Go Back   Adobe Dreamweaver Forums > Dreamweaver: Main > Dreamweaver General
 
Tags:

Reply
  #1 (permalink)  
Old 07-24-2008, 03:31 AM
mjs
 
Posts: n/a
Diggs:
Default Centering <div> in 2008

I've Googled this and come up with 100 different ways to do it, all dating
back to 2001-2004 (why is it so hard to sort Google results by most recent?)

Anyhoo, was wondering if someone could give me the 2008 version : how do I
center a DIV? Not its contents, but the div itself.

Thanks!


Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-24-2008, 05:58 AM
Walt F. Schaefer
 
Posts: n/a
Diggs:
Default Re: Centering <div> in 2008

margin: 0 auto;

--

Walt


"mjs" <no@thanks.com> wrote in message
news:g68piq$sg9$1@forums.macromedia.com...
> I've Googled this and come up with 100 different ways to do it, all dating
> back to 2001-2004 (why is it so hard to sort Google results by most
> recent?)
>
> Anyhoo, was wondering if someone could give me the 2008 version : how do I
> center a DIV? Not its contents, but the div itself.
>
> Thanks!
>



Reply With Quote
  #3 (permalink)  
Old 07-24-2008, 05:58 AM
mjs
 
Posts: n/a
Diggs:
Default Re: Centering <div> in 2008

"Walt F. Schaefer" <walt@waltswebworx.com> wrote in message
news:g68tq3$3f9$1@forums.macromedia.com...
> margin: 0 auto;


Thanks!


Reply With Quote
  #4 (permalink)  
Old 07-24-2008, 08:56 AM
Malcolm _
 
Posts: n/a
Diggs:
Default Re: Centering <div> in 2008

On Wed, 23 Jul 2008 22:31:30 -0400, "mjs" <no@thanks.com> wrote:

>I've Googled this and come up with 100 different ways to do it, all dating
>back to 2001-2004 (why is it so hard to sort Google results by most recent?)
>
>Anyhoo, was wondering if someone could give me the 2008 version : how do I
>center a DIV? Not its contents, but the div itself.
>
>Thanks!
>

Goggle advance search has a date/time parameter towards the bottom of
the page.

http://www.google.co.uk/advanced_search?hl=en

http://www.google.co.uk/search?hl=en...i=&safe=images
--

~Malcolm~*...
~*
Reply With Quote
  #5 (permalink)  
Old 07-24-2008, 11:30 AM
David Powers
 
Posts: n/a
Diggs:
Default Re: Centering <div> in 2008

Walt F. Schaefer wrote:
> margin: 0 auto;


For this to work, the element (<div>) needs a declared width. Without a
width, the element remains on the left of the page.

--
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/
Reply With Quote
  #6 (permalink)  
Old 07-24-2008, 02:29 PM
mjs
 
Posts: n/a
Diggs:
Default Re: Centering <div> in 2008

Naturally, because <div> can't hug content like tables can. They're either
100% wide, or have a static value.

Another limitation of divs that seems unnecessary to me. Why does no width
have to mean 100% width? We accept these realities as they are but never
question them. I can't think of any good reason why divs can't hug content
the way tables do, UNLESS they're specified to be 100% wide.

"David Powers" <david@example.com> wrote in message
news:g69nn1$17s$1@forums.macromedia.com...
> Walt F. Schaefer wrote:
>> margin: 0 auto;

>
> For this to work, the element (<div>) needs a declared width. Without a
> width, the element remains on the left of the page.



Reply With Quote
  #7 (permalink)  
Old 07-24-2008, 02:29 PM
mjs
 
Posts: n/a
Diggs:
Default Re: Centering <div> in 2008

"Malcolm _" <malcom@mon.org> wrote in message
news:bkeg8450sfnbnmi4au5tg905v21g8u2hq4@4ax.com...
> On Wed, 23 Jul 2008 22:31:30 -0400, "mjs" <no@thanks.com> wrote:
>
>>I've Googled this and come up with 100 different ways to do it, all dating
>>back to 2001-2004 (why is it so hard to sort Google results by most
>>recent?)
>>
>>Anyhoo, was wondering if someone could give me the 2008 version : how do I
>>center a DIV? Not its contents, but the div itself.
>>
>>Thanks!
>>

> Goggle advance search has a date/time parameter towards the bottom of
> the page.


I know we can pull out only results from the past day, week or month... but
I'd like to pull out ALL the results, and just have them sorted by most
recent.

For some reason, Google still cannot do this.


Reply With Quote
  #8 (permalink)  
Old 07-24-2008, 03:08 PM
Walt F. Schaefer
 
Posts: n/a
Diggs:
Default Re: Centering <div> in 2008

You're welcome.

--

Walt


"mjs" <no@thanks.com> wrote in message
news:g6901t$5g9$1@forums.macromedia.com...
> "Walt F. Schaefer" <walt@waltswebworx.com> wrote in message
> news:g68tq3$3f9$1@forums.macromedia.com...
>> margin: 0 auto;

>
> Thanks!
>



Reply With Quote
  #9 (permalink)  
Old 07-24-2008, 03:08 PM
Murray *ACE*
 
Posts: n/a
Diggs:
Default Re: Centering <div> in 2008

Wrong, but who's counting? 8)

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
==================


"Walt F. Schaefer" <walt@waltswebworx.com> wrote in message
news:g6a2m1$d2g$1@forums.macromedia.com...
> You're welcome.
>
> --
>
> Walt
>
>
> "mjs" <no@thanks.com> wrote in message
> news:g6901t$5g9$1@forums.macromedia.com...
>> "Walt F. Schaefer" <walt@waltswebworx.com> wrote in message
>> news:g68tq3$3f9$1@forums.macromedia.com...
>>> margin: 0 auto;

>>
>> Thanks!
>>

>
>


Reply With Quote
  #10 (permalink)  
Old 07-24-2008, 03:08 PM
Murray *ACE*
 
Posts: n/a
Diggs:
Default Re: Centering <div> in 2008

> Naturally, because <div> can't hug content like tables can.

This is not a detriment.

> Why does no width have to mean 100% width?


That's how all block tags work (<p>, <h#>, <div>, etc.).

> I can't think of any good reason why divs can't hug content the way tables
> do, UNLESS they're specified to be 100% wide.


You are tilting at windmills as a way of avoiding the truth of HTML.

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
==================


"mjs" <no@thanks.com> wrote in message
news:g6a29l$cie$1@forums.macromedia.com...
> Naturally, because <div> can't hug content like tables can. They're either
> 100% wide, or have a static value.
>
> Another limitation of divs that seems unnecessary to me. Why does no width
> have to mean 100% width? We accept these realities as they are but never
> question them. I can't think of any good reason why divs can't hug content
> the way tables do, UNLESS they're specified to be 100% wide.
>
> "David Powers" <david@example.com> wrote in message
> news:g69nn1$17s$1@forums.macromedia.com...
>> Walt F. Schaefer wrote:
>>> margin: 0 auto;

>>
>> For this to work, the element (<div>) needs a declared width. Without a
>> width, the element remains on the left of the page.

>
>


Reply With Quote
Reply


Thread Tools
Display Modes

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

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



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 03:07 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Inactive Reminders By Mished.co.uk