Mobile app version of vmapp.org
Login or Join
Sherry384

: How to style a div on the home page like a blog post 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

@Sherry384

Posted in: #Css

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: i55.tinypic.com/bgvkgx.jpg
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

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Sherry384

1 Comments

Sorted by latest first Latest Oldest Best

 

@Harper822

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;).

Basically:
#div_el {
position: absolute;
float: right;
}


Should help a bit.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme