Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a theme. Because I don't have a static home page, a list of my latest posts is my home page.

I want to add a drop-down box which I have coded on my starting home page which should remain static (just for home section). For this, I tried to code it in index.php, but the problem is the box is outside that. It is not coming up. I mean that the post is wrapped in a box content, the same as I want for my drop-down menu.

See this image, with HELLO text:

Normally it is coming in simple line, but I want it to be wrapped in a box, like the posts.

I know that I just need to put a small div and p tag. I tried, but maybe my position is wrong, can anyone help me here

share|improve this question

closed as off-topic by Stephen Ostermiller Dec 13 '13 at 18:01

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question appears to be off-topic because it is unlikely to help anybody else. Examples include individual website reviews for SEO purposes and general website troubleshooting." – Stephen Ostermiller
If this question can be reworded to fit the rules in the help center, please edit the question.

What have your written so far? You're going to have to show some code if you want to get good help. – John Conde Dec 4 '10 at 14:28
up vote 1 down vote accepted

Using a <div> tag might solve your problem, however the <div> tag automatically puts in a line-return or break (<br>). I would suggest either positioning the <div> tag absolutely (Using position: absolute; in CSS), then float it right (Using float: right;).


#div_el {
    position: absolute;
    float: right;

Should help a bit.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.