Can anyone help me figure out how to add color to just the top and bottom border lines of each row, while disabling the side colors? The attached picture shows what I am aiming for.
Can anyone help me figure out how to add color to just the top and bottom border lines of each row, while disabling the side colors? The attached picture shows what I am aiming for.
Utilize border-bottom/top
(indicando uma borda apenas para o top
e bottom
)
td, th {
border-bottom: 1px solid #dddddd;
border-top: 1px solid #dddddd;
}
Aprenda mais em:https://www.w3schools.com/css/css_border.asp
Veja um exemplo:
table {
font-family: arial, sans-serif;
border-collapse: collapse;
width: 100%;
}
td, th {
border-bottom: 1px solid #dddddd;
border-top: 1px solid #dddddd;
text-align: left;
padding: 8px;
}
<table>
<tr>
<th>Empresa</th>
<th>Contato</th>
<th>País</th>
</tr>
<tr>
<td>Alfreds Futterkiste</td>
<td>Maria Anders</td>
<td>Alemanha</td>
</tr>
<tr>
<td>Centro comercial Moctezuma</td>
<td>Francisco Chang</td>
<td>México</td>
</tr>
<tr>
<td>Ernst Handel</td>
<td>Roland Mendel</td>
<td>Áustria</td>
</tr>
<tr>
<td>Island Trading</td>
<td>Helen Bennett</td>
<td>Reino Unido</td>
</tr>
<tr>
<td>Laughing Bacchus Winecellars</td>
<td>Yoshi Tannamuri</td>
<td>Canadá</td>
</tr>
<tr>
<td>Magazzini Alimentari Riuniti</td>
<td>Giovanni Rovelli</td>
<td>Itália</td>
</tr>
</table>
When it comes to borders on a DIV element:
border-top: 1px solid Green;
border-bottom: 1px solid Green;
I trust this information proves useful.
If you're looking to change the border color of a div element, you can try using the following CSS code:
.myDiv {
border-top-color: red;
border-bottom-color: red;
}
By applying this CSS rule, the top and bottom borders of your div will be red in color. Hopefully, this resolves any questions or concerns you may have had.
Imagine a scenario where I have a service that either returns an error or a video URL to be played. If a video is present, React will display the video; if not, it shows the error message. I want to ensure that there is always a placeholder/error message w ...
Currently, I am utilizing AngularJS to manage the enabling and disabling of image buttons. Despite my attempts to use a CSS selector to display them as transparent once disabled, it is not working as expected. While testing with a provided example that app ...
I am interested in changing the right border color of a DIV when another one is hovered over. I had to use a unique solution to make slideToggle work, so I assume this will require a different approach as well. Below is the detailed code: $(document).rea ...
Welcome to my app! Check out the link to my app here: http://jsbin.com/axeWOwAN/1/edit If you prefer a full-screen view, click here: http://jsbin.com/axeWOwAN/1 I'm encountering an issue with the map on the second page of my app. The map works perf ...
Check out the HTML code on jsfiddle.net as it's too lengthy to post here. I'm having trouble figuring out how to change the width of a column. Specifically, I want to make the "Produkt" column wider. ...
I'm looking to implement a feature that automatically breaks or paginates HTML content in order to ensure that the resulting PDF matches the appearance of the original HTML. Requirement: If HTML content exceeds the size of an A4 paper, it should be s ...
UPDATE: I have encountered an issue with my HTML page containing two forms, each with a single submit button. I attempted to call a specific function when the submit button is pressed. To achieve this, I included two <script> tags to handle the butto ...
My layout structure is as follows: <div class="row"> <div class="columns small-12 large-6 medium-12 panel-wrapper"> Box no 1 </div> <div class="columns small-12 large-6 medium-12 panel-wrapper"> Box n ...
I'm facing some challenges with responsiveness on my landing page. Utilizing the scrollify jQuery library, users can skip between different sections of the landing page on click or scroll. However, when switching to landscape orientation on mobile d ...
I created a menu component html (src/menu/menucomponent) that displays images from a folder (src/assets/images/image.png) for the main navigation when viewed on a computer. Additionally, I have a side navigation that is displayed on mobile devices. Here i ...
I am struggling to merge filters in a similar manner to this example: http://codepen.io/desandro/pen/JEojz/?editors=101 but I'm facing difficulties. Check out my Codepen here: http://codepen.io/anon/pen/gpbypp This is the HTML code I'm working ...
I am facing an issue where I need to customize the active state of bootstrap .nav-link in the code snippet below: <li className="nav-item"> <a className={`${styles.navLink} nav-link`} role="tab" data-to ...
I am in the process of transitioning the existing browserify workflow into a single gulp task: package.json: "scripts": { "build": "browserify src/main.js > dist/build.js" }, ... "browserify": { "transform": [ "vueify", "babelify" ] } . ...
Is there a method to retrieve all the CSS styles specified for a specific DOM element? Do I need to iterate through all the CSS style names? Could there be a more sophisticated approach? How exactly does Firebug achieve this task? Appreciate any insights ...
New to ExpressJS and trying to figure out how to reference images stored in the /public/images/ directory in my /public/stylesheets/styles.css The code snippet below doesn't seem to be working for me: .home-bg { background-image:url('../ima ...
In order to streamline the process of fetching content during server side rendering, I am considering using MySQL directly as the data source. This would eliminate the need for an additional API server solely dedicated to retrieving data from the databas ...
Currently, my wordpress blog has a unique theme and is powered by Jetpack. I've activated Sharing and added various social media sharing services like Facebook, Twitter, Google+, Digg, among others in the "Enabled Settings" section. However, the sha ...
I am currently using Bootstrap and have an accordion with collapsible buttons. Each button consists of two columns of text and an icon on the right. My issue is that I'm attempting to break the text in the second column into multiple lines so that it ...
Here is an example that I need The images are being loaded from a MySQL while loop, and I want the spacing between them to be such that the left column and right column touch each side with the middle image centered. Just like in the picture :D This is m ...
I want to create a numeric keypad in HTML with numbers 1-9, and I'm unsure if JavaScript can handle an onclick function for each key to show the number in the display div. What would be the most effective way to achieve this? <div id="display"> ...