Jump to content

Centering page with CSS


AbbyShotDev

Recommended Posts

hahah

 

LoL no it is not yet solved.. I got to put some time into the positioning now soon.. I am currently working on a layaway section for the site.. then im going to go back and use freakies suggestions.. thanks again, I will try it today or tomorrow..

Link to comment
Share on other sites

I always wondered when I'd run into someone from this shithole.  Yeah, I used to work at Rib Country in '05.

 

.. regardless of it being cool to run into someone so close... within 7 years of phpfreak-ship, this has nothing to do with centering a DIV.

 

I humbly beg your pardon!

 

There is a ton of stuff in this forum that has nothing to do with the topic including  a lot by admins, mods and gurus. If I had a gleaming I was breaking protocol you can be sure I would have never posted such.

 

But you can be sure I will never address you again.

Link to comment
Share on other sites

I always wondered when I'd run into someone from this shithole.  Yeah, I used to work at Rib Country in '05.

 

.. regardless of it being cool to run into someone so close... within 7 years of phpfreak-ship, this has nothing to do with centering a DIV.

 

I humbly beg your pardon!

 

There is a ton of stuff in this forum that has nothing to do with the topic including  a lot by admins, mods and gurus. If I had a gleaming I was breaking protocol you can be sure I would have never posted such.

 

But you can be sure I will never address you again.

No need to take offense man, I was just being honest.  Although I know there are many threads that do go off-topic, I try not to advocate it.  If it makes you feel any better, I'm on here now replying off-topic.

 

If I offended you, then I apologize, but I wasn't trying to be an ass.  I honestly think it's awesome that someone from Murphy is on here.

Link to comment
Share on other sites

hahah

 

LoL no it is not yet solved.. I got to put some time into the positioning now soon.. I am currently working on a layaway section for the site.. then im going to go back and use freakies suggestions.. thanks again, I will try it today or tomorrow..

 

It is solved i provided the code which works, but you didn't apply it.

Link to comment
Share on other sites

Did that and the background images goes off the left margin entirely with:

 

html, body {
margin:0 auto; 
padding:0;
width:100%; 
height:100%; 
text-align: center;
    }

 

makes this happen:

 

Example.jpg

 

 

Should I even have html and body together like that?

 

my style sheet is accessable , you guys can see it,

 

I am yet to try cssfreakies fixes, I will let you know how that goes, but thats what happened when i tried that

Link to comment
Share on other sites

as far as i can see, your page is centered. So that seems the problem is solved. just checked in ie789 and firefox 4.

to center a block. give it a width and use margin:0 auto; on it.

 

although i must say, your mark-up is pretty over complicated. In other words this could be done much easier.

 

First of all, don't use tables for layout purposes, it's chaotic  and redundant.

Second, if you would just take a div as wrapper (as a container around all your content and a width of for instance 960px; than use margin:0 auto on it you

 

#wrapper{width:960px; margin:0 auto;}

 

in html

...
<body>
  <div id="wrapper">
     your content inside here.
  </div>
</body>
...

 

 

When i do this it just messes up my background image.. I dont think my backgroudn placement is right either, can you look at my code? the source? and www.abbyshot.com/styles.css

Link to comment
Share on other sites

you either pay no attention at all to what is said above or you just missed something which worked. Which i doubt, because you said you were to test it about a week ago...

So to rephrase that, the code below works, apply it in your stylesheet where you define the properties for #scroller.

 

 

#scroller{
height: 100%;
    margin-left: auto; /* changed */
    margin-right: auto; /* changed */
    overflow: visible; 
    position: relative; /* changed */
    text-align: left;
    width: 1000px; /* changed */
    z-index: 1;
}

 

this works! just like a week ago...

 

P.s. so run through your stylesheet ones you reached the point where #scroller is defined, replace that with the above.

Link to comment
Share on other sites

You got it.. I must have missed something or didn't change all the fields cause this time you got it and this is SOLVED.

 

thanks

 

 

dunno how more clear you could have been but thanks , with a simple copy and paste that got er done

 

 

much love, talk to you later im sure :P

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.