1. This website uses cookies. By continuing to use this website you are giving consent to cookies being used.
    For information on cookies and how you can disable them visit our Cookie Usage page.
    Dismiss Notice

CSS center dj

Discussion in 'Web Development' started by djwilson, Sep 3, 2009.

  1. djwilson

    djwilson New Member

  2. bmcoll3278

    bmcoll3278 New Member

    ok a few things

    first move your style sheet up it needs to be between <head> and </head>

    Hear is your sheet now
    Code:
    <style type="text/css"> 
    .img1 { text-align: center }
     
    .adspace_right {
    	float: right;
    	margin: 180px 160px 10px 10px;
    }
     
    .adspace_left {
    	float: left;
    	margin: 180px 10px 10px 160px;
    }
     
    </style> 

    Make it this

    Code:
    <style type="text/css"> 
    .img1 { text-align: center }
     
    .adspace_right {
    	float: right;
    	margin: 180px 160px 10px 10px;
    }
     
    .adspace_left {
    	float: left;
    	margin: 180px 10px 10px 160px;
    }
     div.centered {
     text-align: center;
     border-width: 0px;
    }
     
    </style> 

    now right after the body tag<body>

    change it to

    Code:
    <body><div class="centered">

    and at the bottom of the page

    Code:
    </div></body>
    every thing inside that div will be centered.
     
  3. djwilson

    djwilson New Member

    Hi, it hasnt worked?
     
  4. bmcoll3278

    bmcoll3278 New Member

    I am sorry I should have looked harder before my answer.

    you know what they say about (ass u me)

    I pulled your style sheet and I am not a template pro but I can see that everything is positioned by the style sheet
    You will see lines that look like this
    margin: 33px 40px 41px 85px;

    If you make a copy you can go back to in case you screw up then start playing with these numbers in your style sheet you will start moving things around on the page. If you mess it up just upload a copy that you saved and start again.
     
  5. ishkey

    ishkey Moderator, Logos, Sports Crests Staff Member Verified Member

    It could be because in the original css file it has outer, wrapper (something for ie6 and below) and header sectors that are missing.
    The one which centers it is the wrapper, now a days you just set the body sector something like this (wrapper be gone)

    #body{
    width:774px; margin:0 auto;
    }

    Think of the pic below of the upside down pyramid, take away the top layer holding everything down and the lower stuff rushes up to file in it's place.
     

    Attached Files:

  6. djwilson

    djwilson New Member

    Thanks for the help but im going in circles here :(
     
  7. ishkey

    ishkey Moderator, Logos, Sports Crests Staff Member Verified Member

    clockwise or counter-clockwise it's important you know because where CovertPea lives the water goes down the drain backwards from the way it goes down up here.
    That's confusing..........
     
  8. djwilson

    djwilson New Member

    Any clear up, sorry about the dumbness
     
  9. ishkey

    ishkey Moderator, Logos, Sports Crests Staff Member Verified Member

    I was just tring to lighten things up.
    Sorry, I know how it gets when you are pullig your hair out.
    What screen size are you coding for?
    post your css and index.html or whatever - will look at it.
     
  10. djwilson

    djwilson New Member

    Dave, sorry, I wasnt having a pop at you.

    mmm, not sure sorry, 17" screen if that helps.
     
  11. djwilson

    djwilson New Member

  12. CovertPea

    CovertPea Moderator Staff Member Verified Member

    hang on a minute..
    I reckon the water down under swirls the right way. :D

    Here's a thought..
    what about those countries centre to the equator, does their water just drop down straight? :rolleyes:
     
  13. ishkey

    ishkey Moderator, Logos, Sports Crests Staff Member Verified Member

    I would hope straight down and not up.:D
    In physics, the Coriolis effect is an apparent deflection of moving objects when they are viewed from a rotating reference frame.

    http://en.wikipedia.org/wiki/Coriolis_effect

    I think it is centered about as good as I can get it to move. fixed.zip
    The only thing is when the ads are displayed the title
    The DJ Business

    will look like

    The DJ
    Business
     

    Attached Files:

  14. bmcoll3278

    bmcoll3278 New Member

    I have wondered about that myself.
     
  15. djwilson

    djwilson New Member

    Thanks Dave, the right ad it sorted, just gotta play with left ad and bingo!

    Thanks again.