View Full Version : Radio button with <p> tag issue

02-10-2012, 05:07 PM
Hey all,

I am pretty new to HTML and CSS and have been stuck on this problem for a few hours now. I created a multiple choice question using hmtl/javascript and everything seems to be working fine. The only issue is that the answers for the question are dynamically pulled from my companies course authoring tool. An example of an answer is <p>True</p>. The problem is the <p> tags around it. I can't get rid of them and they are causing the answer to be below the radio button. Here is an example line:

<input type="radio" name="group1" value="1" class="answer" onclick="selectOption(value)" /><label for="Choice1"><p>this is the answer text</p></label><br />

Does anyone know how I can still have the <p> tags and get the text to be on the same line as the radio button? Any hep would be greatly appreciated.


02-10-2012, 06:01 PM
Hello ballaby,
I imagine default styling on the paragraph tag is messing up your form box? Add something like this to your CSS to zero it out -

That will remove the default 16px top and bottom margin on the p tag.