Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

telerik -- supercharge your DNN websites
  Ads  
 


  Sponsors  

Meet Our Sponsors

Merak Mail Server
WebSecureStores -- ASP.NET & DotNetNuke Hosting Solutions
FCKeditor Project
Salaro -- Skins and more
OnyakTech
The best choice for your web site host, email hosting, and domain registration.
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Make it Hot! ( ...  Center my Content?
Previous Previous
 
Next Next
New Post 2/22/2008 7:43 AM
Resolved
User is offline BeeMarie
83 posts
10th Ranked


Center my Content? 

Hi,

This is probably such a ridiculously simple question that you'll wonder what I'm even doing trying to make a skin. But it seems that while I can figure out the complicated things like embedding panes and skin objects, I am having alot of trouble figuring out something that ought to be simple.

I can't figure out how to write the html code so that it centers my content on the page.

Imagine that you have an html page and you have one table with one cell that is 800 px wide. How do you get the table to be in the center of the browser window when you maximize the window, instead of being on the left side? I've tried coding it a number of different ways and it just stubbornly stays on the left of the page. I'm sick of trying to figure it out!

Please help!

~Bee

 
New Post 2/22/2008 1:16 PM
User is offline keeperofstars
252 posts
9th Ranked


Re: Center my Content? 

have you tried making a div tag that has 100% width and align set to center, then put your table inside the div tag.

I think that will work.

 

 
New Post 2/22/2008 1:33 PM
User is offline Jan Olsmar
412 posts
www.olsmar.com/
8th Ranked




Re: Center my Content? 

Try align="center" in the first table or div.

 

 
New Post 2/23/2008 3:49 PM
User is offline abecedarian
74 posts
10th Ranked


Re: Center my Content? 

something like this:

<table style="width: 800px; margin-left: auto; margin-right: auto; border: thin black solid;">
 <tr>
  <td style="border: thin black solid;">&nbsp;</td>
 </tr>
</table>

renders a table 800 pixels wide with the left and right margins set to 'auto' which should center it (I've added borders to the table and cell so you can see below):

 
 
New Post 2/25/2008 5:00 AM
User is offline BeeMarie
83 posts
10th Ranked


Re: Center my Content? 

Thank you so much y'all! It works now! I'm so happy!

~Bee

 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Make it Hot! ( ...  Center my Content?
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, please observe the following posting guidelines:

1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


Convert Visitors to Customers
In order to bring value to your users, we must first understand them. VIVIDSITES will help you build a custom web application and interactive marketing tools that your users will thank you for. We marry high-end creative with head banging technology to entertain and convert visitors into paying customers. Call 314.514.0505 or visit us at http://www.vividsites.com to find out how.
- V I V I D S I T E S -
Gearworx Web Hosting
As a premier provider of Web Hosting, Private/White Label hosting, Server Colocation, Dedicated Server, and other Managed Services, Gearworx offers an array of services designed to more effectively manage strategies driving businesses on the Web. Headquartered in Fremont, California our state of the art tier one data centers and distributed managed services environment enables Gearworx to offer your business enterprise level solutions through simplified processes.
Gearworx Web Hosting
Glanton: Enterprise Intranet Specialists Using DNN
Glanton Solutions are a premier provider of sevices for large corporates lloking to outsource Intranet sites.
www.glanton.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP