Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
in Q2A Core by
I want to move the "Ask a Question" link so that it appears first. How do I effect such a layout change?

Would this be done via a theme or can I just edit some code? I found the function "nav" in qa-theme-base.php but I have not yet figured out just how the script outputs the "qa-nav-main-list" so I can change the order.

I also need to move the voting and number of answers so they are to the right of each question and not the left. I have a rather narrow view of the page I am presenting in a UI of an application and I want the user to see the most relevant data without having to resize the UI window.
Q2A version: latest

1 Answer

0 votes



learn css. it's easy
css must not be so easy. I modified qa-styles.css by adding the line you suggested. No difference. Even when I commented out the line for .qa-nav-main-item.

I was able to get the order I wanted by changing .qa-nav-main-item to use float:right. But then everything is right justified, which I don't want.

I was able to get close to what I want by leaving the original .qa-nav-main-item float line in the file followed by:
.qa-nav-main-ask .qa-nav-main-link{clear:left}

That resulted in two rows with "Ask a question" left justified. I can live with that. However, this is web programming so quess what? In one browser I see two rows:

Questions Hot! Unanswered Tags Users
Ask a Question

But in my application that uses the IE browser control, the links cascade down and to the right:
Ask a Question

That is not acceptable. Changing the width of my window makes no difference in what I see (even if I refresh).

I have tried a number of things to get what I want by modifying the css code but none have worked. What I want is this:

Ask a Question Questions Hot! Unanswered Tags Users

Perhaps I'll hit on the right combination in the css file but I am beginning to doubt it. That is definitely the best route since eventually I want a mobile theme and my application UI that presents the web page is more like a phone (tall and narrow) than anything else.

I'm beginning to think I have to modify either the DB or the php code itself. That's something I would like to avoid.