Is it possible to adjust the font size of text files that are embedded?

I have been struggling to change the font size of an embedded text file, but the style doesn't seem to be working. Despite trying various approaches, nothing seems to make a difference.

<style>
pre {
  font-family: "Courier New", monospace;
  font-size: 50px;
}
object {
  font-family: "Courier New", monospace;
  font-size: 50px;
}
body {
  font-family: "Courier New", monospace;
  font-size: 50px;
}
</style>

<body>
  <pre class="tab" id="Display">
  <object width="12000" height="12000" type="text/css" data="textFiles/file.txt" border="0" >
  </pre>
</body>

Answer №1

Modifying parameters directly in the "main" html file is not possible. Browsers contain iframes and embedded documents separate from their parent.

To display text, you can either utilize JavaScript or opt for HTML instead of plain text.

Read the original response here:

Adjusting font size within an embedded object

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Unable to apply a CSS border style to the .col-md-10 class

I can't figure out why there's no border showing up around this section on my webpage. .col-md-10 { background-color: red; border-radius: 25px; border-color: gold; border-width: 20px; } Even though I've specified the border properties, it ...

a variance in the line breaks within a horizontal Form Layout

I need to design a form with multiple labels and form elements such as text areas and radio buttons. However, when using the Bootstrap horizontal form method, there is a one-line difference between the label and text area in my code: <!DOCTYPE HTML> ...

Foundation 5 - ensure background-image covers the entire column width

I'm trying to achieve a unique layout using Zurb Foundation. My goal is to have two columns, each taking up half of the screen: <div class="small-6 columns"><!-- INSERT IMAGE HERE --></div> <div class="small-6 columns"> < ...

Incorporate a JSON file into the body of an HTML document

I'm experiencing an issue with loading a Json file into the html body using the script tag, as illustrated below. Here is a sample of the html file: <html> <head></head> <body> <div id="category"></div> <scrip ...

Transferring the final space from a node containing a mixture of content to a separate

Having a multitude of HTML files generated by MS Word, my objective is to modify the contents in order to extract data and perform other tasks. In an HTML paragraph with mixed content, I have noticed that spaces after italicized or bold words also become ...

Easily center list item numbers vertically within fixed height containers

I am facing an issue with the alignment of ordered list item numbers in a list with fixed height and vertically centered content. The numbers seem to be positioned inaccurately. li { height: 80px; border: 1px solid black; } li > span { heigh ...

What is the best way to position a textarea and text input on top of each other alongside a radio button?

Currently struggling with the layout of a website project, specifically positioning a text input and a textarea above each other next to a larger radio box. I came across a similar issue on Stack Overflow but unfortunately, it did not solve my problem. Ide ...

Organizing information in local storage using an array and converting it to a string

After storing user inputs (Worker's name, Car Vin, Start time and End time) in the local storage, you want to sort the employees' names in alphabetical order. The question is where should the code be placed and how should it be written? // Car C ...

Unable to toggle visibility of div using Hide/Show function

I've noticed that the questions already posted do not solve my issue. I have a side menu bar displaying options and I want the content of the selected option to be displayed on the same page, while hiding the other div content. I have tried the follow ...

Why isn't my CSS wrapper reflecting in my HTML code?

Hey there, I'm working on a funny website dedicated to my friends in my computing class and I’ve run into an issue. The wrapper in my CSS isn't being applied to the webpage. It works fine on other pages of the site, but for some reason, it&apos ...

Begin the jQuery ResponsiveSlides Slider with the final image in the <ul> list

Currently utilizing the responsiveSlides image slider from responsiveSlides on our website. This jQuery slider uses an HTML unordered list of images to slide through automatically. The issue I'm facing is that before the slider actually starts (meani ...

ReactJS application encounters difficulty retrieving information from CSV file

In order to demonstrate the issue, I decided to create a new App using the create-react-app tool (available at https://github.com/facebook/create-react-app) My goal is to import data from CSV files into the app. Currently, I am utilizing the CSV method pr ...

Utilize anonymous functions to reassign the button click event - JQuery

I'm dealing with a situation where I have 5 HTML buttons, each with a click event listener attached to it in the form of an anonymous function. For example: $('#button1').click(function(){ //some code }); At a certain poin ...

Issue with compiling Tailwindcss in nextjs JIT mode

Our current project involves using tailwindcss and things were going smoothly until the clients requested a "pixel perfect" design. This meant that every element needed to be set in pixels instead of rem units. Instead of adding countless classes like h-1p ...

What steps should be taken to ensure that the onmouseover and onmouseout settings function correctly?

The Problem Currently, I have a setup for an online store where the shopping cart can be viewed by hovering over a div in the navigation menu. In my previous prototype, the relationship between the shoppingTab div and the trolley div allowed the shopping ...

Utilizing Material UI tabs panel with customized CSS styling

Having trouble changing colors and CSS in the TAB PANEL using material-ui. Any tips or suggestions? :( It seems like useStyle and theme functions are not working as expected. I was able to modify other properties like scrollable, but colors seem to be fix ...

Styling Challenge: Making the button inside a form match the design of the button outside the form

I have noticed that the button inside a form has a lot more padding around it compared to the one outside of the form. I am trying to adjust the within-form button so that it matches the padding of the without-form button. HTML/PHP <?php if (! ...

Is it possible to deactivate the CSS hover effect using JavaScript?

There is a parent element with an associated child element. Right now, the child element is hidden and only appears when hovering over the parent. It vanishes when the mouse moves away from the parent due to css settings. The goal is for the child elemen ...

The initialization of the view keeps happening repeatedly

Currently, I'm in the process of developing a dashboard that bears some resemblance to this one Admin Dashboard Theme In my project, I am incorporating a fixed Right Side Sidebar similar to the one shown in this screenshot https://i.sstatic.net/7KdMY ...

Tips on hiding the checkbox within the Material UI TextField input when using MenuItems with checkboxes

I've customized the MenuItems in a TextField of type Select to include checkboxes. However, when I select an item from the menu, the checkbox is also displayed in the input field of the TextField. Requirement: I want to hide the checkbox in the TextF ...