Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 77806

Re: Multiple small questions, probably easy for you, hard for me! HELP! :) link provided

$
0
0

Don't use negative margins. They cause problems.

 

To center something, all you need to do is define its width as something less than 100% and give it margin:0 auto...

 

<body>

     <div id="centered" style="width:500px; margin:0 auto; border:1px solid black;">

          <p>some content</p>

     </div>

</body>

 

The centered div above will be 500 pixels wide and sit centered within the body element.


Viewing all articles
Browse latest Browse all 77806

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>