Please visit my new Web Site https://coderstechzone.com
When browsing we found a lot of website midle centered. The question is how developer doing this. In forums i found many times this question. Its simple and easy to middle the content for div based design. To do that wrap up all div in one div and then apply some CSS to middle or center the web page.
I want to make the below example:
To do that add an aspx page in your project. Then add the below stylesheet/CSS under head HTML tag:
<style type="text/css"> #main_container {width: 760px;margin:auto} #content { background-color:gray; font-weight:bold; color:White; } </style>
Now write the below code under BODY tag:
<form id="form1" runat="server"> <div id="main_container"> <div id="content"> Main Body Here </div> </div> </form>
Now run the page. Hope you found your content in middle or center of the browser.
1 comments:
This is my Good luck that I found your post which is according to my search and topic, I think you are a great blogger, thanks for helping me out from my problem..
I WOULD BE DELIGHTED TO HEAR FROM YOU