Hello, I'm trying to do a margin-left depending on the resolution of the screen...
I want to margin the page to hold it in the center all... like daniweb... you can see that all is centered, but then you can move things to the left and right like logo and adds... I think that I could do this with a div, and then put all inside and put it centre and it will be centre depending on resolution, am I right ???
Jump to Post
Maybe I misunderstood you, but this is very common:
display: block; margin-left: auto; margin-right: auto; /*OR...0*/ margin-left: 0 auto; margin-right: 0auto;
I'm not sure which is correct, but it's something like that.
All 5 Replies
We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.