Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: DIV Centering

  1. #1
    Junior Member
    Join Date
    Oct 2010
    Location
    Portland, Oregon
    Posts
    22

    Default DIV Centering

    The web site I need you to look at is http://www.elliotwolff.com/test/

    I am trying to center everything in background1.jpg div at top of page (the nav bar) as well as everything in the pattern1.png footer div area at bottom of screen regardless of screen size. I'm lost.

    I have the pattern1.png and background1.jpg centered regardless of screen size but the contents inside them will not center.

    Do you have a solution I can try to fix this?

    Thanks for your time.

    Dustin

  2. #2
    Senior Member franko's Avatar
    Join Date
    Apr 2010
    Location
    Tasmania Australia
    Posts
    2,642

    Default

    First thing I notice is you're using absolute positioning. Try changing the html output to html 4 dynamic rather than html 5 and see if that makes a difference. Clear any code you've put in yourself and make sure the Centre in Browser check box in Layout Propertise is checked. Then do a clean Local Publish (deleted anything in LP first).

  3. #3
    Junior Member
    Join Date
    Oct 2010
    Location
    Portland, Oregon
    Posts
    22

    Default DIV Centering not working

    I tried your suggestion and didn't see anything really different. Everything centers properly under HTML 4 but then I lose the 100% width.

    The problem it seems is the centering gets stuck based on the width of the layout region in NOF even though the actual layout region is scaling to the width of the page the contents are not.

    I made a video of my NOF file and then you can see both publishing options and how I have the file setup. You can view the video here:

    http://www.screencast.com/t/LXi4DJRM

    Any feedback/suggestions are greatly appreciated.


    Quote Originally Posted by franko View Post
    First thing I notice is you're using absolute positioning. Try changing the html output to html 4 dynamic rather than html 5 and see if that makes a difference. Clear any code you've put in yourself and make sure the Centre in Browser check box in Layout Propertise is checked. Then do a clean Local Publish (deleted anything in LP first).
    Dustin D.
    http://www.DustinDrorbaugh.com - Built w NetObjects Fusion 13
    http://www.Paula-Abdul.net - Built w NetObjects Fusion 13

  4. #4
    Senior Member
    Join Date
    Apr 2010
    Location
    Sydney
    Posts
    2,000

    Default

    why remote publish for testing???? do a local publish

    also, you are changing html output in the property palette, that is wrong because it only applies to one page, always leave that setting on Use site settings and then set the publish method globally, try HTML5 wiith UTF8 or HTML5 dynamiv and UTF8 and local publish the full site each time you change the setting

    your doctype is clearly wrong
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

  5. #5
    Senior Member
    Join Date
    Apr 2010
    Location
    Sydney
    Posts
    2,000

    Default

    wrong doctype and XHTML tag, I would not use XHTML

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

  6. #6
    Junior Member
    Join Date
    Oct 2010
    Location
    Portland, Oregon
    Posts
    22

    Default

    I'm using whatever doc type NetObjects assigned. I never specified one.

    I have always published my tests live so I can test on various computers in a real environment.

    I will change the setting for the entire site once I can get the first page to work properly. Do you think changing the doc type is going to solve my problem? Apparently you watched the video, so what am I doing wrong to prevent my site from doing what I am trying to accomplish?

    Dustin





    Quote Originally Posted by antonsvideo View Post
    why remote publish for testing???? do a local publish

    also, you are changing html output in the property palette, that is wrong because it only applies to one page, always leave that setting on Use site settings and then set the publish method globally, try HTML5 wiith UTF8 or HTML5 dynamiv and UTF8 and local publish the full site each time you change the setting

    your doctype is clearly wrong
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

  7. #7
    Senior Member
    Join Date
    Apr 2010
    Location
    Sydney
    Posts
    2,000

    Default

    the doctype has a big influence on how your site will look

    after you make the changes, do a local publish and view the source and make sure the correct doctype and charset are shown as below and nothing else

    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="UTF-8"/>

    or do a remote publish and let me check the source again
    Last edited by antonsvideo; 07-31-2015 at 05:38 AM.

  8. #8
    Senior Member
    Join Date
    Apr 2010
    Location
    Sydney
    Posts
    2,000

    Default

    also, your site has a viewport tag <meta name="viewport" content="width=device-width" />

    this tag causes display issues since your site is not designed for mobile devices, remove the tag

  9. #9
    Junior Member
    Join Date
    Oct 2010
    Location
    Portland, Oregon
    Posts
    22

    Cool NOF 100% Width Footer tutorial

    This is what I was looking for:

    http://wiki.netobjects.com/Using_CSS...5_width_footer

    NetObjects has a tutorial on how to create a 100% footer. See the link above. I was able to get it to work on my site.


  10. #10
    Senior Member
    Join Date
    Apr 2010
    Location
    Sydney
    Posts
    2,000

    Default

    good, an you also have the correct doctype and charset now

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •