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 ???
Member #733618
Recommended Answers
Jump to Post— kooia 1Maybe 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.
Jump to Post— jsmall26 0If you're talking about the width, you could say
<style> body{margin: 0px, 5%, 0px, 5%;} </style>... is that what you're talking about?
All 5 Replies
kooia 1 Light Poster
Member #733618
jsmall26 0 Light Poster
drjohn 56 Posting Pro in Training
Member #733618
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.