I want to start a Blogger blog showing the interesting outputs that I have gotten from AI language models. To reliably distinguish my inputs from the model’s outputs, I want to use a styling convention that will show a vertical blue line to the left of my input text and a vertical green line to the left of the model’s output text. Help me develop this styling using HTML and CSS.
Sure, I can help you create a simple HTML structure and CSS to achieve this styling. First, create an HTML file and add the following code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AI Outputs Blog</title>
<style>
body {
font-family: Arial, sans-serif;
line-height: 1.6;
margin: 40px;
}
.input, .output {
display: block;
position: relative;
padding-left: 20px;
margin-bottom: 20px;
}
.input::before, .output::before {
content: '';
position: absolute;
top: 0;
left: 0;
bottom: 0;
width: 4px;
}
.input::before {
background-color: blue;
}
.output::before {
background-color: green;
}
</style>
</head>
<body>
<div class="input">
Your input text goes here.
</div>
<div class="output">
AI model's output text goes here.
</div>
<!-- Add more pairs of input and output as needed -->
</body>
</html>
This code sets up a basic HTML structure with a <style>
tag inside the <head>
section, where the CSS is defined. The input and output elements are both styled with a padding-left of 20px to create space for the vertical line. The vertical lines are created using the ::before
pseudo-element and given a fixed width and background color (blue for input, green for output).
You can add more pairs of input and output <div>
elements inside the <body>
section as needed. Just replace the placeholder text with your actual content.
No comments:
Post a Comment