Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 6 of 6

Thread: Centering a Div

  1. #1
    Member
    Join Date
    Aug 2013
    Posts
    89
    Member #
    37057

    Centering a Div

    Hi, I need to center the div #comingsoon_topgraphic. I found this page, I think the page is relating to absolute positioning rather then no positioning or relative positioning ? I don't have any positioning on the div. I don't think I need it for such a simple page ?

    If anyone has a tablet, (iPad or Samsung) I would appreciate how the page presently looks on these devices ?

    Feedback question, maybe the code could be styled with {display:block} on the div= #comingsoon_topgraphic ? Eliminating the two classes within the div ?

    (Link to my page)

  2.  

  3. #2
    Junior Member Acamapichtli_Design's Avatar
    Join Date
    Sep 2013
    Location
    South Africa
    Posts
    16
    Member #
    37227
    Liked
    4 times
    There is an easier way to do, or with plugins, but generally, I tend to do it uses percentages

  4. #3
    Member
    Join Date
    Aug 2013
    Posts
    89
    Member #
    37057
    I want to center the div on the page, horizontally. I don't need plugins for that.

  5. #4
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    Code:
    margin:  0px auto; /* auto calculates left and right margins automatically and centers the element between them */
    width:  800px; /* adjust as needed */
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  6. #5
    Member
    Join Date
    Aug 2013
    Posts
    89
    Member #
    37057
    TheGame - Thank you, I think I came across the style you posted in a search, I was not sure
    Last edited by Shang Tsung; Nov 02nd, 2013 at 08:09 PM.

  7. #6
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    Yeah...you searched this thread to see if anyone else posted to it, and you found my reply. See? Searching works!
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 09:31 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com