How Do I Make A Div Tag Center In Css
RegisterLogin
How Do I Make A Div Tag Center In Css
Post Description: This Tutorial Will Show You About Centering A Div Using Css And Html With Sample Easy Code
Tags: How, Do, I, Make, A, Div, Tag, Center, In, Css
This Post Was Posted On Oct 21, 2009 By Webune Support #2608
Post Description: This Tutorial Will Show You About Centering A Div Using Css And Html With Sample Easy Code
Tags: How, Do, I, Make, A, Div, Tag, Center, In, Css
This Post Was Posted On Oct 21, 2009 By Webune Support #2608
How Do I Make A Div Tag Center In Css by Webune Support
if you are visiting our post its probably because you want to know how you can make a div center in the middle.. right?
well, if you do, you are in luck because here at Webune, we will show you.
lets say for example you have this code:
HTML CODE:
<div align="center">Put me in the center</div>
ok, as you can see at the code above, it puts that div in the center of the page.
how can you do it with css?
ok, you can do it this way:
HTML CODE:
<div style="text-align:center">Put me in the center</div>
but i find that the most effective way for centering a div is this way:
HTML CODE:
<div style="margin:0 auto;">Put me in the center</div>
depending on what you want to do, you have three choices now and three different ways to center a div using HTML or CSS
as you can see, our prefer way is the center div margin 0 auto way.. but you have to center div using css. you can also do div margin left but that will only work on a div margin right when a div is align left. another useful way to center div horizontally is to center acontainer div in the center div vertically of the page.
hope that helps
Webune Support Team
Leave Your Comments
Related Pages: [Add Your Website]
Post New Topic
internet
#4694 1
nice discussion going on here because i am also php programmer if i solve any problem of some one i think it's good for me.
Dec 18, 2010 Reply Report abuse
titulare
#4569 2
i have internet explorer 8 and your code doesn work.
but you can use this as the very first div in your code:
<div align="center"></div>
but you can use this as the very first div in your code:
<div align="center"></div>
Oct 26, 2010 Reply Report abuse
muslimahbutik.com
#3749 3
its work dude, thx
muslimahbutik
muslimahbutik
Apr 08, 2010 Reply Report abuse
Leave Your Comments...
©2012 Webune Forums - Wed Dec 12, 2012 8:20 pm
Powered by: Webune Forums V3
Powered by: Webune Forums V3