close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

"forcing" a font size in output

Thread began 10/09/2022 8:07 am by yogastudents362523 | Last modified 10/17/2022 1:16 pm by Ray Borduin | 362 views | 6 replies |

yogastudents362523

"forcing" a font size in output

Hello,

My Results page has sets of Presenters arranged in groups of 4. (Thank you again). Each of the 4 Presenters displayed on that Results page is accompanied by a "display extract" consisting the first 500 characters of that Presenters bio, which I extract. Unfortunately, some Presenters rearrange their bios away from the default font and size. Thus the CKeditor is providing strings such as "font-size:16px", and which then affect the page's look and design.

Before I set to and jury rig a php string/replace routine using regular expressions and the like, does the CK editor allow one to force text to adopt the default of other size: i.e. as an override?

Thank you

Sign in to reply to this post

Ray BorduinWebAssist

You can override font settings in the CSS on the page where it is displayed. For example, you could wrap your bio in <div class="shortBio"></div>

and then use a css class definition like:

.shortBio {
font-size: 12px !important;
}



The !important at the end will prevent it from being overridden by the bio html.

Sign in to reply to this post
Did this help? Tips are appreciated...

yogastudents362523

Thank you.

I just copied the parts I wanted from my main style sheet into the head of that file.
And added the !important.
I can now adjust it from there on the fly as and when needed.

The !important did it!!!

Sign in to reply to this post

yogastudents362523

Hi,

I was too quick in saying that !important had fixed the problem. It hasn't. If you view the link in the private area, you will see that there is an HTML editor styling in place to give some white Comic Sans text on a green background, and which is not being overwritten either by the style in the head, or by inline directives.

I am reluctant to start trying to design a whole bunch of regular expression search and replaces, so think I will just have to accept that the page is not going to be properly harmonized. If a Presenter changes font styles or etc in their bio, the difference is going to be registered on this Records page.
Thank you

Sign in to reply to this post

Ray BorduinWebAssist

Where did you add the !important font family tag?

Sign in to reply to this post
Did this help? Tips are appreciated...

Ray BorduinWebAssist

Try changing:

<style>
.shortBio {
color: #565656 !important;
font-family: Raleway, Helvetica, sans-serif !important;
font-size: 15px !important;
font-weight: 300 !important;
line-height: 1.75 !important;
letter-spacing: 0.025em !important;
background-color: inherit !important;
}
</style>


To:

<style>
.shortBio, .shortBio span {
color: #565656 !important;
font-family: Raleway, Helvetica, sans-serif !important;
font-size: 15px !important;
font-weight: 300 !important;
line-height: 1.75 !important;
letter-spacing: 0.025em !important;
background-color: inherit !important;
}
</style>
Sign in to reply to this post
Did this help? Tips are appreciated...

yogastudents362523

Hi

Thank you. I now have:
.shortBio, .shortBio span, .shortBio p, .shortBio span p, .shortBio p span, .shortBio p span span, .shortBio span span

That has fixed them all except one, which is still being stubborn.

I'll leave it a few moments and then re-examine the text as stored in the database in case I am misreading the tags. I'll figure it out eventually!!

Thank you very much

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...