Supernova icon alignment problem

phpBB3 styling support, style coding, and style graphics assistance.
Forum rules
Style coding and style related questions only.

Supernova icon alignment problem

Postby JsnHardy » 02 Oct 2011, 12:49

Hello everyone! I tried to get support from the style author to no avail :cry: so I'm hoping someone here can help me! I was wondering anyone could point me in the right direction to which file I need to go back and look at. I have installed multiple mods on my forum, and somewhere along the way, it misaligned a few things. When i am viewing my subscriptions, or when I am looking at the multiple newsletter page, the new\old icons are off. But on the main index page the icons are fine. I have attached a few screen shots. Thank you for any help.
Attachments
cc1j.jpg
cc2.png
cc3.png
JsnHardy
Cadet I
Cadet I
 
Posts: 10
Joined: 01 Feb 2009, 02:42
Gender: Male
phpBB Knowledge: 3




phpBB Academy at StarTrekGuide
Support STG
Using PayPal Donate

Re: Supernova icon alignment problem

Postby Sniper_E » 02 Oct 2011, 22:20

In your forumlist_body.html this is the line that shows the forum icons that line up correctly.
Code: Select all
         <dl class="icon" style="background-image: url({forumrow.FORUM_FOLDER_IMG_SRC}); background-repeat: no-repeat;">

In your viewforum_body.html this is the line that shows post icons that do not line up correctly.
Code: Select all
         <dl class="icon" style="background-image: url({topicrow.TOPIC_FOLDER_IMG_SRC}); background-repeat: no-repeat;">
            <dt<!-- IF topicrow.TOPIC_ICON_IMG and S_TOPIC_ICONS --> style="background-image: url({T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}); background-repeat: no-repeat;"<!-- ENDIF --> title="{topicrow.TOPIC_FOLDER_IMG_ALT}"><!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF --><a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a>

You see that they both use the class="icon" to line that image up.

Open the theme/content.css and play with these setting.
Code: Select all
/* Forum list column styles */
dl.icon {
   min-height: 35px;
   background-position: 10px 50%;      /* Position of folder icon */
   background-repeat: no-repeat;
}
This lines up fine.

Code: Select all
dl.icon dt {
   padding-left: 45px;               /* Space for folder icon */
   background-repeat: no-repeat;
   background-position: 5px 95%;      /* Position of topic icon */
}
Try playing with these settings to get the topic icons to line up correctly.
Image
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!
User avatar
Sniper_E    
STG Jedi Master
STG Jedi Master
 
Posts: 6979
Joined: 31 May 2006, 06:29
Location: Shreveport, LA
Favorite Team: The STG Team
Gender: Male
phpBB Knowledge: 6

Re: Supernova icon alignment problem

Postby JsnHardy » 02 Oct 2011, 23:25

I cant thank you enough for you help. When I tweak the settings, I can get it to line up right on the newsletter page, but it messes up the index page. I'm wondering if it would be easier to change the newsletter icons to something that would fit? I'm not sure where to change the code so to load different icons though. What do you think?

I installed supernova on a completly unmodded forum and it still does it. I guess its a bug. Screenshot of fresh install is the first picture.
Attachments
4.png
1.png
2.png
3.png
JsnHardy
Cadet I
Cadet I
 
Posts: 10
Joined: 01 Feb 2009, 02:42
Gender: Male
phpBB Knowledge: 3

Re: Supernova icon alignment problem

Postby KelsW » 10 Feb 2012, 06:01

JsnHardy did you fix the problem. If so could you send me the code that fixed the problem. Thanks.
KelsW
Crewman
Crewman
 
Posts: 1
Joined: 10 Feb 2012, 05:58
Gender: Male
phpBB Knowledge: 2

Re: Supernova icon alignment problem

Postby Sniper_E » 10 Feb 2012, 09:05

Did you try to adjust the padding as I said above?
Code: Select all
dl.icon dt {
   padding-left: 45px;               /* Space for folder icon */
   background-repeat: no-repeat;
   background-position: 5px 95%;      /* Position of topic icon */
}

The [/c]padding: 45px;[/c] moves the text to the right leaving enough room for the forum icon to show.
If you are using wider forum icon images you need to increase that padding to make more room for the image.

If adjusting that padding adjusts padding in other areas of your forum that you don't want adjusted you can make a class.
In the forumlist_body.html you can add a class in the <dt class="" like this:
Code: Select all
      <li class="row">
         <dl class="icon" style="background-image: url({forumrow.FORUM_FOLDER_IMG_SRC}); background-repeat: no-repeat;">
            <dt class="forums" title="{forumrow.FORUM_FOLDER_IMG_ALT}">
Then in your theme/content.css stylesheet add this code for the forums:
Code: Select all
dl.icon dt.forums {
   padding-left: 65px;               /* Space for folder icon */
   background-repeat: no-repeat;
   background-position: 5px 95%;      /* Position of topic icon */
}
Try that...
Image
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!
User avatar
Sniper_E    
STG Jedi Master
STG Jedi Master
 
Posts: 6979
Joined: 31 May 2006, 06:29
Location: Shreveport, LA
Favorite Team: The STG Team
Gender: Male
phpBB Knowledge: 6


Return to phpBB3 Styling Assistance

Who is online

Users browsing this forum: No registered users and 5 guests