We’ve put up with a Landing Page annoyance regarding iPhone Portrait viewing for some time now, but today we’ve bitten the bullet and attended to the issue whereby the last “g” in RJM Programming butted up to the right hand side of the Portrait screen annoyingly. They say “pixel perfect” and today’s work is a bit like that, further to other web inspector work helping the Landing Page talked about at Landing Page Web Inspector CSS Styling Tutorial.
Today, we make use of the fact that CSS can be dynamically changed in the arrangements of most webpages just by adding <style> CSS styling </style> into the innerHTML property of a suitable HTML element.
We also found the CSS clause …
!important
… impotent, on occasions, helping, and so we went around with Javascript DOM “undoing” a className scenario, something we cannot remember ever undertaking, but not so strange given it is only …
- iPhone device width
- Portrait
… scenarios we are talking about here. That “unclassing” leaves the door open to ensuring our chosen 62px font-size CSS property holds sway, for these scenarios. In doing the job, it was our default just to break the …
RJM Programming
… text at the space character, and that “ever so mild” scrunching up of content helped, but there are a myriad of ways to going about this job, tabularized below …
Idea | Javascript DOM |
---|---|
Default |
|
Border |
|
Classname |
|
Margin |
|
Font |
|
After |
|
Wording |
|
Overflow |
|
Was |
… in a changed index.php RJM Programming Landing Page.
Previous relevant Landing Page Web Inspector CSS Styling Tutorial is shown below.
Are you a member of the IBORT? If not, would you like to become a member? Anyone, anyone? Hang on, Isaac, can you please “use your words” in front of the class, please …
What does IBORT stand for?
Okay, class … over to you …
Well, okay Sandra, yes, we understand “World Peace” might work … but anyone else?
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
You all give up?!
International Board of Registered Tweakers
(no Registered Tweakers were harmed in the making of this infomercial)
Yes, you can tweak webpages in the morning or afternoon, and for simple styling changes we recommend …
- getting the relevant webpage showing in your favoured web browser on a non-mobile platform …
- inspect that webpage via that web browser’s Web Inspector … for Google Chrome on macOS we went …
View -> Developer -> Developer Tools -> "Elements" tab
… - the “before your eyes, dynamically” approach being to zero in on web element style=”[CSS styling]” parts and, “tweak away” …
- the results immediate and further tweakable, until you are happy … then …
- think what can be done to directly, or indirectly (eg. “client pre-emptive iframe” action) to simulate this change back at the relevant code (in our RJM Programming Landing Page case some PHP in our Apache web server’s Document Root folder called “index.php”) to simulate what you were happy with back at your Web Inspector session (ie. until this, your changes are “Ephemeral”) …
- you upload into place to turn a “tweak” into some “tweak realia”
If this was interesting you may be interested in this too.
If this was interesting you may be interested in this too.