Centering Imageready Div Content

NamecheapNamecheap
Watch

RedCrescent

Established Member
Impact
0
Imageready does a great job when it comes to generating HTML and XHTML code for you. The only problem I ran into took several of my teachers months to figure out... how to center a web site that you exported through Imageready using the new XHTML standars and Div tags.

Usually, to get around this problem, you would just export your site in tables instead of div tags. This really defeats the purpose though. After searching, we finally found a way around it. We slapped ourselves after we saw how simple the answer was. I figured I'd post the fruits of our labor so others wont run into the same problem.

The items in bold are the ones that need to be changed in the existing code:

</head>
<body style="margin-left: 50%; background-color:#000000">
<!-- ImageReady Slices (Untitled-1.psd) -->
<div id="Table_01" style="position: relative; width:760px; left: 380px;">


If you run into any trouble, don't hesitate to ask me. The pixel values here are assuming your site is 760px wide.
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
Wow, I actually had this problem a while ago. Thanks. :)
 
0
•••
I just find it funny that we had CSS and XHTML experts, people with masters degrees in this kind of thing, and the answer turned out to be so simple an ultra clean.
 
0
•••
CatchedCatched

We're social

Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
DomDB
NameFit
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back