The text in the main body is center aligned!

For support and discussion related to templates, themes, and imagesets in phpBB 3.0.
Get Involved
Locked
Ezz
Registered User
Posts: 56
Joined: Sat Aug 23, 2008 9:32 pm

The text in the main body is center aligned!

Post by Ezz »

Hi all.
I tried to modify my style which is subsilver2 based, to achieve new space for forum sponsors (as shown in the picture).
Picture of index page of the forum. In the body text is aligned 'center'
Picture of index page of the forum. In the body text is aligned 'center'
Printskrin Ars.jpg (735.24 KiB) Viewed 512 times
I added the following code:
  1. i added a <table> with only one cell, aligned 'center'
  2. then i added another table with 3 cells, the second cell being MAIN BODY content cell
The thing is, that Firefox displays the content in the MAIN BODY as it was befor the changing the code with tables ('left alignment of the content') - so no problems in Firefox ;)
When I tried the changes in Opera and Internet Explorer, the content of the forum is aligned 'center'. I must have overriden some css style, but I am not well experienced programer, so I need some help.

So I changed Overall_header and Overall_footer file like it follows:
Overall Header:

Code: Select all

</head>
<body class="{S_CONTENT_DIRECTION}">

[b]<table width="100%" border="0">
  <tbody>
    <tr>
      <td align="center">
         <table border="0">
           <tbody>
              <tr>[/b]
                 <td valign="top" style="padding-top: 165px"><br />  
                      <!-- IF ADS_9 -->{ADS_9}<br /><!-- ENDIF --></td>
                 [b]<td>[/b]

                      <div id="wrapper">
                         <a name="top"></a>
                            <div id="wrapheader">
And in Overall Footer, I just closed the appropriate table tags.
Any suggestions. Please help.

Thanx :)

User avatar
Mick
Support Team Member
Support Team Member
Posts: 22432
Joined: Fri Aug 29, 2008 9:49 am
Location: Cardiff

Re: The text in the main body is center aligned!

Post by Mick »

I think I know what you mean but don't really understand why making the text centred would make more room on the sides? Why not just reduce the width of your forum?

http://www.phpbb.com/community/viewtopi ... &p=3849325

or you could do something similar to this explanation for prosilver.

http://www.phpbb.com/community/viewtopi ... 15&start=0
"The more connected we get the more alone we become" - Kyle Broflovski©

Ezz
Registered User
Posts: 56
Joined: Sat Aug 23, 2008 9:32 pm

Re: The text in the main body is center aligned!

Post by Ezz »

Thanx for the answer, but you misunderstood me. Firefox displays cell content in main body of the forum just as I want it to. Layout of the main body is the same as before my code changes to Overall_Header.
In the picture below, Firefox displays the main body of the forum as it should - CORRECT! The content in the main body of the forum is left aligned.
Firefox displays the content CORRECT!
Firefox displays the content CORRECT!
MF oglasi vredu.jpg (170.92 KiB) Viewed 501 times
Internet explorer and Opera display the main body content WRONG! When inspecting html with Opera's developers tool I found out, that the content of the main body is 'center' aligned. This is different from original css file, where it says that the content should be left aligned. My code for <table> overrides the css style and I don't know how can I avoid this.
In the picture below, Internet Explorer displays the content in the MAIN BODY wrongly - NOT CORRECT! The content in the main body of the forum is center aligned.
IE displays the content WRONGLY!
IE displays the content WRONGLY!
IE narobe oglasi.jpg (189.89 KiB) Viewed 501 times
Thanx for the clues (maybe in the future I will try to make the sidebar ADDs with float as you suggested, but tables seem easier to me for now).

Help. Thanx

User avatar
Mick
Support Team Member
Support Team Member
Posts: 22432
Joined: Fri Aug 29, 2008 9:49 am
Location: Cardiff

Re: The text in the main body is center aligned!

Post by Mick »

I'm still a little confused what you are trying to achieve but forget that. There are known issues with IE and CSS, have a read of this maybe it will help you.
"The more connected we get the more alone we become" - Kyle Broflovski©

vagex
Registered User
Posts: 4
Joined: Wed Apr 27, 2011 6:16 am

Re: The text in the main body is center aligned!

Post by vagex »

Anyone figured out how to left-justify posts in IE?

Locked

Return to “[3.0.x] Styles Support & Discussion”