Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Center my Content?Center my Content?
Previous
 
Next
New Post
2/22/2008 10:43 AM
 

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 4:16 PM
 

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 4:33 PM
 

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

 

 
New Post
2/23/2008 6:49 PM
 

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 8:00 AM
 

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

~Bee

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Center my Content?Center my Content?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, 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 DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out