i have a new class for my footer texts in style.css and my page is www.ariahost.net . now in firefox my text align "left" is working fine but in IE it's on center . what should i do ?

Dani AI

Generated

Short diagnosis and quick fix based on the thread: the footer is being centered by presentational markup higher in the DOM, while the a.footer rule only styles the link itself (inline elements don't change their position inside a centered block). As pointed out, an HTML alignment on the paragraph is the real culprit; 's hint to look for a stray text-align:center is also on target.

A robust, cross‑browser approach is to remove the presentational align attribute and control alignment from the footer wrapper or list instead. Example (adjust selector to match the actual footer ID/class):

/* put this on the footer container (replace #footer with the real selector) */
#footer { text-align: left; }

/* keep the nav list tidy and allow links to behave like blocks */
#footer ul { margin: 0; padding: 0; list-style: none; }
#footer li { display: inline-block; margin-right: 12px; vertical-align: top; }
#footer a.footer { display: inline-block; color: #000; text-decoration: none; }

Troubleshooting checklist:

  • Remove any align="..." or inline style="text-align:…" in the footer markup (these override expectations).
  • Use browser dev tools (F12) to inspect the computed text-align and which rule sets it.
  • Search stylesheets for text-align:center and for parent selectors that may be more specific than a.footer.
  • Confirm a standards DOCTYPE is present (IE quirks mode can change cascades) and check any dir="rtl" on ancestors if the page is Persian/Arabic.

Follow semantic markup (a proper footer and ul/li for link lists) and avoid nested table layout; that reduces surprising inheritance and makes alignment consistent across browsers.

Recommended Answers

All 6 Replies

please show the code...your text align in footer is centered in Firefox

centered in IE8 IE7 Opera FF
? what problem

centered in IE8 IE7 Opera FF
? what problem

i need left align in both IE and Firefox

doh, think the opposite, that it was not displaying the same in IE
show the code for the css, somewhere there is a text-align:center that you missed

Your code says this.

<p align="center"><a href=""> اخبار </a>- <a href="">درباره ما</a> - سوالات متداول -<a href=""> پشتيباني</a> - <a href="">تماس با ما</a> -<a href=""> نقشه سايت </a><br>
تمامي حقوق اين سايت براي شركت آريا هاست محفوظ است . © 1382 - 1389<br>

Copyright © 2003 - 2010 AriaHost.net , All rights reserved. Design By AriaHost Design Department </p>

So naturally it is centered.

But PLEASE try to use css and not inline styles! Such as
#footer p {text-align:center;}

And as for using tables!!! Your footer area is nested five tables deep! Using tables for layout is from a previous century.

PS Do you really charge $11,000 a year for hosting a 50MB site? Sure you don't mean $11.00

Your code says this.

<p align="center"><a href=""> اخبار </a>- <a href="">درباره ما</a> - سوالات متداول -<a href=""> پشتيباني</a> - <a href="">تماس با ما</a> -<a href=""> نقشه سايت </a><br>
تمامي حقوق اين سايت براي شركت آريا هاست محفوظ است . © 1382 - 1389<br>

Copyright © 2003 - 2010 AriaHost.net , All rights reserved. Design By AriaHost Design Department </p>

So naturally it is centered.

But PLEASE try to use css and not inline styles! Such as
#footer p {text-align:center;}

sorry , my mean was top of the footer

example : <li><a href="" class="footer">هاست لینوکس معمولی</a></li>
<li><a href="" class="footer">هاست ویندوز معمولی</a></li>
<li><a href="" class="footer">هاست لینوکس پر حجم</a></li>
<li><a href="" class="footer">هاست ویندوز پرحجم</a></li>
<li><a href="" class="footer">SSL گواهینامه</a></li>

my footer class on style.css is :
a.footer {
color: black;
text-align:left;
}

a:hover.footer {
color: black;
text-align:left;


ps our price is in $ is less than 10$
And as for using tables!!! Your footer area is nested five tables deep! Using tables for layout is from a previous century.

PS Do you really charge $11,000 a year for hosting a 50MB site? Sure you don't mean $11.00

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.