Current location: Hot Scripts Forums » General Web Coding » CSS » CSS: problem with FF: body>txt-align:center


CSS: problem with FF: body>txt-align:center

Reply
  #1 (permalink)  
Old 03-15-06, 07:48 AM
predrag predrag is offline
New Member
 
Join Date: Mar 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Question CSS: problem with FF: body>txt-align:center

The story goes like this...

I started to design personal site and decided it will be center aligned. So it was.

Then, I decided not to develop that theme anymore and started with new one. Then there were problems.
I just can't center-align my layout in Firefox whatever I do. Btw, I use Dreamweaver. In Internet Explorer, it looks like I imagined (good/ok). But, not in FF. I tried to re-type the needed code (from previous ok design) for center align and nothing. I copy-pasted the needed code (just incase) and nothing.
I would not say that I'm a noob and this is starting to stress me. Maybe I was to tired after hours and hours of hand-coding, but I really don't se where is the problem.

I coded test *.css file and test *.html file just for the purpose of center align. It goes like this (css):

Code:
body {
    padding: 0;
    margin: 0;
    text-align: center;
}
#wrapper {
    margin: 0;
    text-align: justify;
    position: relative;
    width: 720px;
    height: 550px;
    background-color: #cccccc;
    z-index: 1;
}

#content {
    width: 480px;
    height: 550px;
    background-color: #666666;
    left: 0;
    z-index: 2;
    position: relative;
}
In html, I nested the content layer in wrapper layer. But the wrapper is not centered in FF and is centered in IE (I know I repeat muself alot, but I'm a bit lost).

Anyone can point me where is the solution?
Thanks in advance,
Predrag
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 03-16-06, 04:18 AM
FiRe FiRe is offline
Code Guru
 
Join Date: Oct 2004
Location: UK
Posts: 801
Thanks: 0
Thanked 0 Times in 0 Posts
try adding "float: center;"
__________________
Alexa Share <-- Trade virtual shares in websites with this online game.

codR.us <-- Submit and vote for your favorite code snippets with codR.us.

XEWeb.net <-- The ultimate PHP resource network.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
CSS border problem in firefox, looks good in IE vertigoflow CSS 1 02-18-06 11:30 AM
CSS Border problem in FireFox mani786 CSS 1 10-01-05 08:33 AM
CSS Div problem themanmathias CSS 1 09-29-05 09:05 PM
CSS / HTML problem! zenonflare HTML/XHTML/XML 1 08-18-05 05:45 AM
CSS Only website problem... Justin171985 CSS 5 06-15-05 04:48 PM


All times are GMT -5. The time now is 09:02 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.