HighDots Forums  

centering in browser, even beyond top and left limits

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss centering in browser, even beyond top and left limits in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
(_seb_)
 
Posts: n/a

Default centering in browser, even beyond top and left limits - 11-13-2004 , 09:44 AM






Hi all

Is there a way to center (at least orizontally) a fixed size div in the
browser window, so that when the window width is smaller than the div
width, the div doesn't get stuck against the left limit of the window,
but continues to stay centered, i.e. continues to shift to the left,
BEYOND the left limit of the browser window.

Does this make sense?

can anybody help me?

Reply With Quote
  #2  
Old   
Murray *TMM*
 
Posts: n/a

Default Re: centering in browser, even beyond top and left limits - 11-13-2004 , 09:51 AM






Have you tried the min-width style? I believe that IE gets this wrong in
just the way you describe.

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"(_seb_)" <sebnewyork (AT) earhlinkREMOVE-THIS (DOT) net> wrote

Quote:
Hi all

Is there a way to center (at least orizontally) a fixed size div in the
browser window, so that when the window width is smaller than the div
width, the div doesn't get stuck against the left limit of the window, but
continues to stay centered, i.e. continues to shift to the left, BEYOND
the left limit of the browser window.

Does this make sense?

can anybody help me?



Reply With Quote
  #3  
Old   
(_seb_)
 
Posts: n/a

Default Re: centering in browser, even beyond top and left limits - 11-13-2004 , 11:03 AM



hmm... I'd be looking for a way to do this not using a browser bug, but
consistently, positively, and cross-browser.
Any constructive ideas?
I guess that would entail understanding why and how everything actually
gets stuck to the top left of the browser window.

I've thought of using P7's Snap Layer extension, and snap the Layer to a
1 pixel by 1 pixel image centered in a 100% width table...
I guess that might work, but I thought there would be a simple CSS way
to acheive that without javascript?...

Murray *TMM* wrote:

Quote:
Have you tried the min-width style? I believe that IE gets this wrong in
just the way you describe.


Reply With Quote
  #4  
Old   
Murray *TMM*
 
Posts: n/a

Default Re: centering in browser, even beyond top and left limits - 11-13-2004 , 11:42 AM



I thought you wanted the left edge of the div NOT to align to the left edge
of the viewport but to extend left of that point.

Is that not what you want?

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"(_seb_)" <sebnewyork (AT) earhlinkREMOVE-THIS (DOT) net> wrote

Quote:
hmm... I'd be looking for a way to do this not using a browser bug, but
consistently, positively, and cross-browser.
Any constructive ideas?
I guess that would entail understanding why and how everything actually
gets stuck to the top left of the browser window.

I've thought of using P7's Snap Layer extension, and snap the Layer to a 1
pixel by 1 pixel image centered in a 100% width table...
I guess that might work, but I thought there would be a simple CSS way to
acheive that without javascript?...

Murray *TMM* wrote:

Have you tried the min-width style? I believe that IE gets this wrong in
just the way you describe.




Reply With Quote
  #5  
Old   
(_seb_)
 
Posts: n/a

Default Re: centering in browser, even beyond top and left limits - 11-13-2004 , 12:43 PM



you thought right, I want the left edge of the div NOT to align to the
left edge of the viewport but to extend left of that point.
But your first reply suggested using a bug in IE to acheive this:

"Have you tried the min-width style? I believe that IE gets this wrong
in just the way you describe."

Is there a way to acheive this cross-browser, using CSS, and not by
counting on a browser getting it wrong, but getting it right?


Murray *TMM* wrote:

Quote:
I thought you wanted the left edge of the div NOT to align to the left edge
of the viewport but to extend left of that point.

Is that not what you want?


Reply With Quote
  #6  
Old   
Murray *TMM*
 
Posts: n/a

Default Re: centering in browser, even beyond top and left limits - 11-13-2004 , 12:59 PM



I only know how to do this using some kind of dHTML scroller effect - see
the extensions for such at PVII, or Marja's site.

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"(_seb_)" <sebnewyork (AT) earhlinkREMOVE-THIS (DOT) net> wrote

Quote:
you thought right, I want the left edge of the div NOT to align to the
left edge of the viewport but to extend left of that point.
But your first reply suggested using a bug in IE to acheive this:

"Have you tried the min-width style? I believe that IE gets this wrong in
just the way you describe."

Is there a way to acheive this cross-browser, using CSS, and not by
counting on a browser getting it wrong, but getting it right?


Murray *TMM* wrote:

I thought you wanted the left edge of the div NOT to align to the left
edge of the viewport but to extend left of that point.

Is that not what you want?




Reply With Quote
  #7  
Old   
(_seb_)
 
Posts: n/a

Default Re: centering in browser, even beyond top and left limits - 11-13-2004 , 02:06 PM



thanks Murray.

If I think about my problem I imagine that a way to approach it could be
to define the body width as 200% for example?...
I guess I'll have to spend time experimenting with strange ideas like
that and hope that something's going to work.

I just assume that the Left limit of the browser window is a material
wall-like limit only *by default*, and that specifying the appropriate
CSS rule would hence overrule this "default" setting.

It would be nice if someone could tell me if I'm right or if I'm wasting
my time.

Murray *TMM* wrote:

Quote:
I only know how to do this using some kind of dHTML scroller effect - see
the extensions for such at PVII, or Marja's site.


Reply With Quote
  #8  
Old   
T.Pastrana - 4Level
 
Posts: n/a

Default Re: centering in browser, even beyond top and left limits - 11-13-2004 , 04:01 PM



You could do it with some javascript or with negative margins and
percentages using css. Maybe worth a look for you to experiment with. Don't
think it will fly in NN4.

http://www.fourlevel.com/nimbus/divs/center_p.htm


--
Regards,
...Trent Pastrana
www.fourlevel.com

-----------------------------




"(_seb_)" <sebnewyork (AT) earhlinkREMOVE-THIS (DOT) net> wrote

Quote:
thanks Murray.

If I think about my problem I imagine that a way to approach it could be
to define the body width as 200% for example?...
I guess I'll have to spend time experimenting with strange ideas like
that and hope that something's going to work.

I just assume that the Left limit of the browser window is a material
wall-like limit only *by default*, and that specifying the appropriate
CSS rule would hence overrule this "default" setting.

It would be nice if someone could tell me if I'm right or if I'm wasting
my time.

Murray *TMM* wrote:

I only know how to do this using some kind of dHTML scroller effect -
see
the extensions for such at PVII, or Marja's site.




Reply With Quote
  #9  
Old   
(_seb_)
 
Posts: n/a

Default Re: centering in browser, even beyond top and left limits - 11-13-2004 , 04:05 PM



thanks for the link, it seems to be exactly what I'm looking for!
my grandpa told me about NN4, I don't think I should worry too much
about it.

T.Pastrana - 4Level wrote:

Quote:
You could do it with some javascript or with negative margins and
percentages using css. Maybe worth a look for you to experiment with. Don't
think it will fly in NN4.

http://www.fourlevel.com/nimbus/divs/center_p.htm



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



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.