Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Expression Web Tutorial -Center a Web Page (or a div)

Loading...

Sign in or sign up now!
49,281
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Aug 20, 2008

How to Center a Web Page: Have to center each independent div by using CSS.
1. Set a width for the div's
2. Make the R and L margins "auto" for the div's

Category:

Science & Technology

Tags:

License:

Standard YouTube License

  • likes, 2 dislikes

Link to this comment:

Share to:

Uploader Comments (Expressionweb2)

  • wow, that's great! you're a fantastic teacher

  • @aprimic thank you!!

  • THANK YOU. I have looked at half a dozen tutorials about how to do this and every one of the b$^$%^^ts left something out. Your simple tutorial is the first one that actually worked. Thanks again. :)

  • @regaltwo Thanks! And I do know what you mean. That's why I was meticulous in creating my tutorials to make sure I did not miss a step!

  • I have actually discovered a way by complete accident to get rid of those "margins" lol. Changing all the pages margin aspects to 0px. But there is a real serious question I have that might be a little more complex. I'll post it where you instructed me to.

  • @staticdynamicandnul Web browsers apply basic defaults to our web pages. To remove these defaults, we specify styles just as you mentioned, commonly, we zero out all margins and padding using either a css reset or possibly a universal selector. You can ask more questions about all this on my help forum.

Top Comments

  • Thanks :) helpful tutorial

see all

All Comments (61)

Sign In or Sign Up now to post a comment!
  • @staticdynamicandnul I am trying to add the link to my help forum, but I keep getting an error. So, I will add it to the video as an annotation

  • @staticdynamicandnul Thanks! And, that is a Great Question! Since you have other questions, and because I need more space to appropriately answer this question, go to my Help Forum where you can ask all your questions. You will need to register an account and I will personally approve your account, and then you can ask your questions. For now, I will post your question and my answer so you can read it right away.

  • first of all excellent video, this is the only suggestion that worked for me. i've always designed websites in photoshop for fun but I'm just now taking the coding part serisously. I have a bunch of questions that I'm sure you can answer. My first question is how can you but the top of the container to the very top edge of the webpage, as you can see in your video there is a white line between the browser window and your black graphic.....make sense?

  • Very good! Do you have a tutorial on CSS vertically centering? I mean one div inside another. I've tried some

    methods and cannot get it to work properly. Thanks.

View all Comments »
Loading...

0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more