HighDots Forums  

Center objects relative to browser window

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Center objects relative to browser window in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
cameronianLS
 
Posts: n/a

Default Center objects relative to browser window - 07-06-2004 , 05:32 PM






Hi,
I've been trying for hours to figure out how to center content (images for
now, more later) in the browser window. I feel like it should be really easy
and obvious but I've been trying to figure it out for hours with support,
tutorials and the Dreamweaver MX Bible. Can anyone tell me how to position an
image relative to the window instead of in a certain position (absolute?) such
as in frames or tables.
Preferably, if there is a way to do it both without and with layers.
Thank you


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

Default Re: Center objects relative to browser window - 07-06-2004 , 05:40 PM






For centering layers with any content, here is a good example

http://www.roast-horse.com/tutorials/_tutorials/css_centered_content/index.html

And here is how -

(inline styles used for clarity)

<div id="wrapper" style="width:760px; top:0; margin:0 auto;
position:relative;">
<div id="layer1" style="width:200px; top: 25px; left:140px;
position:absolute;">blah</div>
<div id="layer2" style="width:180px; top: 136px; left:23px;
position:absolute;">blah</div>
</div>

Try that - an outer relatively positioned division with a width and auto
left and right margins. All interior AP divisions will be centered, yet
retain the
same relative positioning.


--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver MX
(If you *MUST* email me, don't LAUGH when you do so!)
==================
news://forums.macromedia.com/macromedia.dreamweaver - THE BEST WAY TO GET
ANSWERS
==================
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
==================

"cameronianLS" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
Hi,
I've been trying for hours to figure out how to center content (images
for
now, more later) in the browser window. I feel like it should be really
easy
and obvious but I've been trying to figure it out for hours with support,
tutorials and the Dreamweaver MX Bible. Can anyone tell me how to position
an
image relative to the window instead of in a certain position (absolute?)
such
as in frames or tables.
Preferably, if there is a way to do it both without and with layers.
Thank you




Reply With Quote
  #3  
Old   
cameronianLS
 
Posts: n/a

Default Re: Center objects relative to browser window - 07-06-2004 , 06:47 PM



Thank you for the answer.
Unfortunately, I don't understand it. I am using Dreamweaver because I don't
know how to write code. I was hoping it would be possible to put some pictures
on a website and have them always sit in the middle of the browser but I guess
it's just not that easy. Even the content on Macromedia's site sits in the
middle of the window, even when you resize it.


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

Default Re: Center objects relative to browser window - 07-06-2004 , 06:50 PM



First concept - it's not possible to make good web pages without knowing
some HTML.

It's simple to center things - there are hundreds of ways to do it. The
method you choose would depend on your capabilities.

Put a table on the page. Set it to center align. Put an image in the
table. It's going to be horizontally centered. Is that what you want?

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver MX
(If you *MUST* email me, don't LAUGH when you do so!)
==================
news://forums.macromedia.com/macromedia.dreamweaver - THE BEST WAY TO GET
ANSWERS
==================
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
==================

"cameronianLS" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
Thank you for the answer.
Unfortunately, I don't understand it. I am using Dreamweaver because I
don't
know how to write code. I was hoping it would be possible to put some
pictures
on a website and have them always sit in the middle of the browser but I
guess
it's just not that easy. Even the content on Macromedia's site sits in the
middle of the window, even when you resize it.




Reply With Quote
  #5  
Old   
cameronianLS
 
Posts: n/a

Default Re: Center objects relative to browser window - 07-06-2004 , 08:43 PM



Hi,
YES! that worked perfectly. Thank you so much. Any other ways that easy? I
knew it was going to be something obvious.
I'm defenitly noticing that I'm going to have to learn some code. I guess I
should pay more attention to it from now on.
Thanks again
C


Reply With Quote
  #6  
Old   
:. Nadia .:
 
Posts: n/a

Default Re: Center objects relative to browser window - 07-07-2004 , 01:08 AM




"cameronianLS" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
Hi,
YES! that worked perfectly. Thank you so much. Any other ways that easy?
I
knew it was going to be something obvious.
I'm defenitly noticing that I'm going to have to learn some code. I guess
I
should pay more attention to it from now on.
That's the best way to learn actually. Every time you add sometime to the
page, have a look at the code to see what has been written to it.
Slowly, you will notice a trend on how things are put together and why.
Will help you troubleshoot any problems you are having with your pages.


--
Nadia
---------------
:Free Templates !! Dropdown Menu Designs:
http://www.DreamweaverResources.com
:Templates: Free Nav Bar Sets:
:Tutorials : Ecommerce : SEO Articles :
-----------------
Macromedia (MM) Technotes:
http://www.macromedia.com/support/search/
-----------------




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.