coldfusion 11 - my css string jumps one line -
my existing web application uses css div class="medblutext" texts:
.medblutext {font: 0.7em book antiqua, georgia, times new roman, serif; font-size: 12px; color: #0000ff;} when use div tag next button or other form field this:
<tr> <td align="right"><div class="medgreytextbold">subject</div></td> <td> <input type="text" name="email_subject" value="" class="inputreqtext" required="true"> <input type="submit" name="emailsend" value="s e n d" class="submitbuttons"> <cfif isdefined("url.err")><div class="medblutext"><cfoutput>#url.err#</cfoutput></div> </td> </tr> the error message in url.err not appear @ same line submit button appears below submit button. there break tag after submit button. if don't use div tag message appears next send button need make text appear same throughout need use div tag. how can still use div tag , make text appear @ same line?
your css style has font properties, there's nothing prevents using on other elements span. difference in styling you're seeing div block level element. take full width of it's containing element. means going start on new line. use inline element span instead. since style not using property margin , only font properties both elements should display same.
.response-text { color: #0000ff; font: 12px 'book antiqua', georgia, 'times new roman', serif; } <label for="subject">subject</label> <input type="text"> <span class="response-text">some error occurred</span> you can set div display: inline; make behave inline element span.
fwiw @ using different naming convention css classes doesn't use specific property values blue. see example above. now, if text color ever changes red, don't have element displaying red text class of .medbluetext.
you might want move away tables form. not mandatory they're lot less flexible using divs. might want work in flexbox.

Comments
Post a Comment