Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8981213
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T20:16:40+00:00 2026-06-15T20:16:40+00:00

Having the following html string to load in a uiwebview, i need to set

  • 0

Having the following html string to load in a uiwebview, i need to set the font-size as a variable value :

    NSString * htmlString = [NSString stringWithFormat:@"\
                             <html>\
                             <style type='text/css'>\
                             hr{ height: 0;border-bottom: 2px dotted #000;}\
                             .Prim{color:#000000; direction:ltr;font-size:%d;font-weight:bold;}\
                             .Def_en{direction:ltr;font-size:%d}\
                             .Def_ar{direction:rtl;font-size:%d}\
                             </style>\
                             <table width='100%%'>\<tr>\<td>\
                             <body>\
                             <p style = 'font-size:%dpx;'> %@ <\p>\
                             </td></tr><tr><td><br><br></td></tr><tr><td align ='center'><br><img src='%@' width='60%%' \><br></td></tr></body>\
                             </table>\
                             </html>",textFontSize , authorNAme , cachePath];

This code is how i imagined it to be but it didn’t work..what should i change in order of giving the font-size attribute the value of a variable textFontSize ?
Thank you in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T20:16:41+00:00Added an answer on June 15, 2026 at 8:16 pm

    i actually found the problem and it was as simple as it can be…here’s the code :

    NSString * htmlString = [NSString stringWithFormat:@"\
                             <html>\
                             <style type='text/css'>\
                             hr{ height: 0;border-bottom: 2px dotted #000;}\
                             .Prim{color:#000000; direction:ltr;font-size:%d;font-weight:bold;}\
                             .Def_en{direction:ltr;font-size:%d}\
                             .Def_ar{direction:rtl;font-size:%d}\
                             </style>\
                             <table width='100%%'>\<tr>\<td>\
                             <body>\
                             <p style = 'font-size:%dpx;'> %@ <\p>\
                             </td></tr><tr><td><br><br></td></tr><tr><td align ='center'><br><img src='%@' width='60%%' \><br></td></tr></body>\
                             </table>\
                             </html>",textFontSize+12,textFontSize,textFontSize,textFontSize,authorNAme , cachePath];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

All, I have the following html as a string in javascript. I need to
Given the following html table and script shown below I am having a problem
I'm following this tutorial http://www.vogella.com/articles/AndroidIntent/article.html for having some data transfered to parent activity by
I am having trouble understanding the following article: http://www.ibm.com/developerworks/java/library/j-jtp01255.html Under, Generics are not covariant
I'm having a problem with the following code snippet: <!DOCTYPE html> <html> <head> <title>Hangman</title>
I am having following action link: <%= Html.ActionLink(Check this, Edit, test, new { id
I'm having the following problems using Javascript and img tags in the standard HTML
I'm having trouble displaying an image in a UIWebView. I retrieve html content from
Having the following xhtml code: <h:form id=COTreeForm> <p:tree value=#{COBean.root} var=node id=COTree dynamic=true selectionMode=single> <p:ajax
I am having this encoding issue in java, one string I actually need to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.