View Poll Results: Why do you feel you have your PHP expertise?
- 2. You may not vote on this poll
- better way?
A quick question, I think (famouse last words!).
I have a ratings system where the user clicks on 1 of 10 horizontally aligned Radio Buttons.
Underneath it, for the visitor's convenience, I have printed the values from 0 thru 9 in order to number the rating of each of the above 10 choices. e.g.:
Ten circles for each of the ratings choices from 0 to 9 (Ten circles).
ID's below each one, indicating the button is for 0, 1, 2, 3, ,,, 9.
In order to line up the numbers with the circles, I find I've had to use a bunch of " " to space the text out to align with the Radio button circles. I tried a "nl3br" but apparently there is no such thing.
Is there a better way to space out the text than using a bunch of between the numbers? I want to keep the buttons horizontally in order to keep the real-estate from being excessively long in the vertical length on the screen. At the font sizes I'm using it takes 3 and a space between each digit.
Is there a better way?
Regards & TIA,
Last edited by Rivet; 07-31-2013 at 05:05 PM.
Settled 4 red convertible
Perhaps. Generally, the "acceptable" way to do things in this regard has moved from markup (e.g., " ") to CSS.
So, I suppose you might have ten DIV tags, all with a left-margin and set to float to the right of each other? Each DIV would contain your button, a linebreak, and the number?
I'd suggest inline-block instead of floats.
I'm sorry; I don't know what you mean unless it was a reference to Dale's post?
Originally Posted by traq
It was. dalecosp was suggesting you utilize the float CSS property, while traq was suggesting setting the display property to "inline-block."
Originally Posted by Rivet
Right. For example,
<input type=radio name=rating value=1><br>1
<input type=radio name=rating value=2><br>2
<!-- etc. ... -->
Screenshot from 2013-08-01 18:30:44.png
border: 1px outset gray;
Last edited by traq; 08-01-2013 at 09:33 PM.
Un Re Member
or simpler just do <span style='padding:0 40px'>blah</span>
note that span can only take left / right padding values , top/bottom are ignored
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread