...

View Full Version : Issue with ASP.NET and CSS (layout isn't centered)



kimmi_baby
05-04-2011, 10:54 AM
Hi,
I'm having a problem with an ASP.net website and CSS.

I've pasted my CSS code from a previous website (HTML and CSS) to have a look at it.
I've copied the basic divs etc into the masterpage.

But I'm finding that the layout isn't centered. The layout would normally be centered with a border but now it's actually positioned left. I've tried this with a few different stylesheets I had and I'm having the same problem.

Is there something special that needs to be done for ASP.net?

Any help would be appreciated!

Thanks!

creativeedg10
05-18-2011, 09:09 PM
That sounds like a CSS issue. Do you have some code for us to look at?

In the CSS, try setting your main container div to margin: 0 auto 0 auto;

That will detect left and right margins and set them to be equal widths. This will center the div to the screen. Circumstances can change this however, but it's a good place to start.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum