Forums

This topic is locked

Internet Explorer centers left justified text.

Posted 28 Apr 2007 08:11:34
1
has voted
28 Apr 2007 08:11:34 dustin Mr. posted:
My website looks different in Firefox and IE6. Look here ( dustinparsons.com ) for the differences. The navigation text has moved to the center. I'm working on other pages of my site right now and IE is centering all the text that should be left justified.

If anyone know how I can fix this it would help me a lot. Thanks in advance.

Replies

Replied 28 Apr 2007 16:41:43
28 Apr 2007 16:41:43 Javier Castro replied:
Show the code you have, to see where the problem is.
Replied 28 Apr 2007 17:51:05
28 Apr 2007 17:51:05 Kenneth Halley replied:
Had a look at your source code- you have a few issues. The problem is ie is inheriting the centre alignment you have placed on the containing div.
To be honest you have a number of issues you would be best to fix really- just observations really.
You have some styles in the page code, some duplicated (body) in an external stylesheet and some stuff on tags themselves. If you want my advice get the page as clean as possible remove all the extraneous stuff from the page and put it in your css. While you build your design have the css in the page header but move it externally when settled.

Getting back to your problem- i sorted it locally by removing the <div align=" center"> on the containing div and then give this div an id of "main".
Add the following css
#Layer1 #main {
margin: auto;
width: 676px;
}
I picked the dimension on the assumption you table is fixed at this width- the box now centres but your text remains left aligned- only checked in ff2 and ie7- so check in ie6 too at least.
It looks like a nice clean design visually just your page code is a bit messy to achieve it.

HTH.

Kenny

-----------------------------------
www.halleynet.co.uk
Replied 28 Apr 2007 18:27:59
28 Apr 2007 18:27:59 Javier Castro replied:
OOPs, too early for me t realize you had put the address there. Anyhow, glad that someone more alert(Kenny) got back to you. One suggestion I have is that you name your divs with something meaningful. Layer1 or layer2 are the default names that DW assigns. But if you call divContainer, divContent, or divFooter makes it much easier to work and to correct problem. One more thing, follow Kenny's wise suggestion to put your css files in a separate file.

Cheers.
Replied 29 Apr 2007 18:23:37
29 Apr 2007 18:23:37 dustin Mr. replied:
Thank you so much for your help! I'll definitely try moving my CSS externally when I'm done.
Replied 30 Apr 2007 06:22:50
30 Apr 2007 06:22:50 Alan C replied:
something else you might like to try, get firefox, then add the developer toolbar, once that is in place you can edit the CSS while viewing the page and see the results immediately then when you are happy with the result save the revised css on your local machine and finally upload it
Replied 27 May 2008 02:40:08
27 May 2008 02:40:08 Eric Kinney replied:
well, the site named above now appears to justify correctly now, this is an old thread, I know. What I am getting is that if a center attribute is set in an enclosing div, that may be what is causing the left-justify to not work.

I have a site that has the same issue; I am trying to float the content box in the center of my time clocks page, so I start out with a centered DIV. I found that at the TD level I can make my text left-justify with an in-line css statement (if interested, my working time clocks page is here, but keep in mind that I will have applied all my solutions soon. Still, for anyone who wants to keep the centered DIV yet overcome ie's need to change text-justification too, this will be a working example of how to do that)

Ultimately I want to set the left justification as high-up as I can, If I could set it globally for every TD site-wide that seems like the best, then I would just have to go look around and see if any exceptions are doing what they are supposed to. I do have an ie-only css file, so I will try to make entries there, rather than hand-entering inline css left-justification in multiple places on every page.

If anyone knows of a blanket css statement that "corrects" ie so that it acts like firefox that would be great, but I doubt such an animal exists because the issue is not with defaults, it is with inheritance behavior. (as far as I can tell).

Oh and Alan's comment about seeing realtime results with the firefox developer toolbar would be great, but that won't show me what ie is going to look like, does it?


Replied 27 May 2008 12:18:08
27 May 2008 12:18:08 Alan C replied:
Hi Eric,
yes it will <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>

you can edit the css and actually see the effect immediately, it's just magic

if you happen to be working on a mac (that's me) have a look at cssedit, it's the best thing I have ever bought, it renders css perfectly and is so flexible, I really would not be without it.
Replied 27 May 2008 23:28:40
27 May 2008 23:28:40 Eric Kinney replied:
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Hi Eric,
yes it will - you can edit the css and actually see the effect immediately, it's just magic

if you happen to be working on a mac (that's me) have a look at cssedit, it's the best thing I have ever bought, it renders css perfectly and is so flexible, I really would not be without it.
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Hmmm I tried to find a way for the developer toolbar to show me the rendered CSS as it would display in ie... can't find it. I am starting to think you thought ie was a typo for "it" (?)

Also, I use Mac usually as well (whenever I can pry the kids off it, they love the huge screen for WoW games). In any case, cssedit gets me several hits on google - any chance of sharing a link to the one you meant? How much is it? oh, and will it show a preview of what ie (internet explorer) for windows will look like? Might save me from having to do so much on a PC.
Replied 28 May 2008 13:05:01
28 May 2008 13:05:01 Alan C replied:
Hi Eric,
I'll do a couple of screenshots to show the developer toolbar and css thing

took a little longer than I expected, I've described this a few times so I decided to make a page off it, I've put it on my joomla advice site here

newtojoomla.com/pages/visual/dev_toolbar_css/

Hope that helps

Now, cssedit, macrabbit.com/cssedit is the place all the info in there, I don't think they have an affiliate scheme so I don't benefit from sending you there <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>

addition - I should have said that there is a tool somewhere, I can't recall where though, it enables you to put in your url then it using many different browsers and gets screenshots from them - they are then available for a limited time, about an hour I seem to recall.

Edited by - sitemaster on 28 May 2008 13:07:06

Reply to this topic