Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

How to align radio buttons inside a DIV?

How to align radio buttons inside a DIV?

Problem

Can someone please guide me in the right direction or tell me what I am doing wrong with my CSS? I want to make my radio buttons aligned Horizontally inside a DIV.

what I want:

|------(*)------|------|
1d     1w     1m     3m

thanks in advance. here is my fiddle for how it looks like now

map.php


CSS:

/*menu bar option*/
#menu_option{
width:200px;
height:600px;
background:#0099FF;
border-style: solid;
border-color: black;
position: relative;
float:right;
overflow:hidden;
text-align:center; 
}

input[type="radio"] {
margin-left:10px;
}

#date_selector{
border:3px;
border-color:black;
}

#button_position{
width: 150px;
height: 80px
position: absolute;
}

#button_position button{
font-weigth:bold;    
font-size:1.3em;
}
Problem courtesy of: alda1234

Solution

Your problem is probably that you're using isset() incorrectly. As you have it right now, the first if statement will always raise an error.

isset( $_POST['date_selected'] === "1d" )

Breaking it down, you have a comparison statement whose result is always a boolean. This is then being passed as a parameter to the isset() function. isset will then raise an error because it doesn't know how to deal with scalar values.

As for aligning the CSS buttons horizontally, please have a look at this other question

Solution courtesy of: Adrian

Discussion

View additional discussion.



This post first appeared on CSS3 Recipes - The Solution To All Your Style Problems, please read the originial post: here

Share the post

How to align radio buttons inside a DIV?

×

Subscribe to Css3 Recipes - The Solution To All Your Style Problems

Get updates delivered right to your inbox!

Thank you for your subscription

×