well, from what I saw on some sites about how to put Code Blocks in HTML and CSS
It works well, but there is something that bothers me
test site
- it appears that the text is not on the left edge instead of being further away
the way what i wanted (slightly modified in Photoshop to suit what I wanted)
well, I wanted the text to align to the border.
I already tried usingtext-align :
here, but it didn’t work
Here is the code for <body> </body>
, since I’m a beginner in HTML:
<body> <!-- body -->
<h1 style="text-align: center;"> Testing </h1>
<h3 style="text-align: center;"> a testing site </h3>
<div id="inv_code">
<pre>
<code class="language-csharp">
public static void Testing()
{
string test = "text";
}
</code>
</pre>
</div>
<script src="js/prism.js"></script>
</body> <!-- body -->
(I’m also new to this forum, I didn’t know I had to post this one too)
well…. I tried using text-align :
with CSS (I’m also new to CSS)
/* edit the preview code of [ inv.cs ]; */
/*
[id="inv_code"] {
left : 50%;
height : 300px;
width : auto;
overflow : auto
}
*/
but it didtn worked
Pedro Gabriel is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.