PDA

View Full Version : CSS problem.



Robbie Comeau
01-13-2008, 08:47 AM
I have a bunch of layers on my page (the one where you can click and drag and position it any where on the screen) then I fill it with some images...

I center it my self, by positioning it with my mouse. But when I change the width of the screen, the picture doesn't move with the screen, and I can understand that.

I have done all I could but I still can't get it to work.

I even made a variable inside my body.



<body>
<div id="box">
</body>

and in my CSS I have,


body
{
margin: 0;
padding: 0;
text-align: center; /* For IE */
}

#box
{
margin: 0 auto;
width: 860px;
border: 2px solid red;
}



Any help would be much appreciated.

Thanks,

Robbie

Tom Marshall
01-13-2008, 02:38 PM
Your width is going to be 860 no matter what size the browser window is. That's probably what's wrong with it.

Robbie Comeau
01-13-2008, 04:19 PM
I figured it out but a different way.

Matt, what would I change the 860 to?

Tom Marshall
01-13-2008, 04:58 PM
Who's Matt?

You would probably need to change it to be margin-left and margin-right.

Matthew R. Rodwell
01-13-2008, 05:10 PM
This wasn't included in the $500?

Tom Marshall
01-13-2008, 05:18 PM
This wasn't included in the $500?

I think it's for a different site, but maybe not?

Matthew R. Rodwell
01-13-2008, 05:20 PM
I guess your right Matt ;P I hope so

Tom Marshall
01-13-2008, 05:21 PM
lol. I think como is confused about a lot of stuff... :grin:

DevonKrain
01-13-2008, 06:06 PM
Hey guys, I'm Matt. Devon's just my stage name.

Tom Marshall
01-13-2008, 06:08 PM
Matt is probably a more "marketable" name... http://www.youtube.com/watch?v=rpWnauo6fmo

Matthew R. Rodwell
01-13-2008, 06:12 PM
Why do you think I picked it, my real name is Biff Bifferson

Robbie Comeau
01-13-2008, 08:33 PM
Sorry, I thought it was Matt that posted for some reason TOM.

Ya that was the problem.

This site is for my dad...

Thanks for the help.

Tom Marshall
01-13-2008, 08:42 PM
No worries, Robbie. Glad it fixed the problem.