This is a discussion on "prevent line break after a checkbox" within the Web Page Design section. This forum, and the thread "prevent line break after a checkbox are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
prevent line break after a checkbox
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
prevent line break after a checkbox
hi,
I have a few checkboxes in a column, with some text next to each one. However, when the text is a little longer than the division, Firefox and IE show different behavior: - in FF the whole line goes on a new line, which is ugly - in IE the line breaks after the first word, and this looks nice Can you tell me how to keep (at least) the first word always next to the checkbox... Thanks in advance! |
|
|
|
#2
|
||||
|
||||
|
Re: prevent line break after a checkbox
Is it possible to post your code or a link to it?
It sounds like this is simply down to how IE and FF handle line wraps. Try wrapping the text in an element, and style that element to a set width.
Last Blog Entry: The Google Misconception (Feb 3rd, 2008)
|
|
#3
|
|||
|
|||
|
Re: prevent line break after a checkbox
Here is my .css:
|
|
#4
|
|||
|
|||
|
Re: prevent line break after a checkbox
could you try something like this.
Pat |
|
#5
|
|||
|
|||
|
Re: prevent line break after a checkbox
hmm, it didn't work for me.
But why do you write display:.... twice ?!?!?! I'm already wondering if my problem can be solved in FF at all. Take a look at this discussion: http://www.webmasterworld.com/forum119/223.htm ...it doesn't seem very optimistic. |
|
#6
|
||||
|
||||
|
Re: prevent line break after a checkbox
One of these should sort you out:
<input type="checkbox" style="display:inline"/> Label OR <input type="checkbox" style="float:left"/> Label
Last Blog Entry: Random String in Javascript (Apr 21st, 2008)
|
|
#7
|
|||
|
|||
|
Re: prevent line break after a checkbox
Wrap the checkbox INPUT element and the text you want on the same line as the checkbox (perhaps just the first word) in a SPAN with STYLE="white-space:nowrap"
|
|
#8
|
|||
|
|||
|
Re: prevent line break after a checkbox
thanks for the advice. I already solved this issue. Don't remember exactly what I did, some tweaks to make both browsers happy.... cheers! |
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [solved] I want to insert a line break | minute44 | PHP Forum | 4 | Feb 20th, 2008 12:52 |
| Fwrite with new line break problem? | meth8200 | PHP Forum | 2 | Feb 4th, 2008 15:23 |
| Line Break | DregondRahl | Web Page Design | 6 | Jun 12th, 2007 15:33 |
| prevent refresh in asp | simonneaves | Classic ASP | 2 | Oct 10th, 2005 09:04 |
| <div> function without the line break | Tim356 | Web Page Design | 10 | Sep 27th, 2004 18:39 |