HighDots Forums  

making div elements move with page

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss making div elements move with page in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Peter O'Connell
 
Posts: n/a

Default making div elements move with page - 07-04-2008 , 04:58 PM






Hi I was wondering how to make a page layed out with div tags keep centered horizontally in a browser?
Thanks
Pete

Reply With Quote
  #2  
Old   
SnakEyez02
 
Posts: n/a

Default Re: making div elements move with page - 07-04-2008 , 05:11 PM






Go over and take a look at the sample page I made for this other individual:


http://www.adobe.com/cfusion/webforu...id=12&catid=18
9&threadid=1375123&enterthread=y

On that page you will see what they were doing with absolute positioning and
you will see the validated page that I made for them with a centered page. Be
sure to look at the source code for that page and the attached CSS document.


Reply With Quote
  #3  
Old   
Murray *ACE*
 
Posts: n/a

Default Re: making div elements move with page - 07-04-2008 , 06:29 PM



Div tags *WILL* move with the rest of the page. It's absolutely positioned
elements that can be troublesome.

Change this -

</head>

to this -

<style type="text/css">
<!--
body { text-align:center; }
#wrapper { text-align:left; width:760px; margin:0 auto;position:relative; }
/* 760px will display on an 800px screen maximized browser window without */
/* horizontal scrollbars. */
-->
</style>
</head>

change this -

<body ...>

to this -

<body ...>
<div id="wrapper">

and this -

</body>

to this -

<!-- /wrapper -->
</div>
</body>

and see if that helps.


--
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
==================

"Peter O'Connell" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
Hi I was wondering how to make a page layed out with div tags keep
centered horizontally in a browser?
Thanks
Pete


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 - 2008, Jelsoft Enterprises Ltd.