admin管理员组文章数量:1326278
I am trying to modify a woocommerce website and I have very little HTML/CSS training. Most of what I've learned has come from trial and error, some online tutorials, playing around with the developer console in Chrome, etc....
I'm trying to add an image border to the top of a page header right before an area called tg-container
. I was able to put one below it, using an existing class, whose info I didn't need to see. Can it be done with the Additional CSS interface built into the theme or do I have to go into the style.css and html to create the boarder? I know the benefit of the Additional CSS interface is having no need to edit the theme files directly whenever the theme is updated.
Bypass Page
Example Page with border - accessible only after bypass page is visited
IMAGE: Example page with Chrome Developer Console open and showing code for area
-------------------- Further Experimentation-------------------------
I created a child theme and am trying to add it that way, but I am missing something (because I'm not a coder), I was able to create the area for the image, but the image isn't showing up. I've tried adding it in the child theme and in the parent theme (editing style.css
and page.php
).
In the page.php
of the child (and the parent) (after the following)
<div class="page-header clearfix">
<div class="tg-container">
I added
<h3 class="title-border"> </h3>
I've tried this in the style.css
of the child:
/*Add Wycinanki Borders*/
.title-border {
background-image: url(".jpg-e1596302126833.jpg");
background-repeat: repeat-x;
font-weight: 600;
color: #3b3b3b;
font-size: 14px;
line-height: 30px;
margin: 5px 0;
}
I've tried this in the style.css
of the child:
/*Add Wycinanki Borders*/
.page-header .title-border {
background-image: url(".jpg-e1596302126833.jpg");
background-repeat: repeat-x;
font-weight: 600;
color: #3b3b3b;
font-size: 14px;
line-height: 30px;
margin: 5px 0;
}
I've tried this in the style.css
of the parent:
.page-header .title-border {
background-image: url(".jpg-e1596302126833.jpg");
background-repeat: repeat-x;
font-weight: 600;
color: #3b3b3b;
font-size: 14px;
line-height: 30px;
margin: 5px 0; }
Again, it has created the space for the image, but the image isn't showing up. I copied the other attributes from the "entry-sub-title", where I was able to put the image successfully, thinking that they would be styled the same way.
Thanks for any insight and helping me learn what I'm doing, hahaha.
I am trying to modify a woocommerce website and I have very little HTML/CSS training. Most of what I've learned has come from trial and error, some online tutorials, playing around with the developer console in Chrome, etc....
I'm trying to add an image border to the top of a page header right before an area called tg-container
. I was able to put one below it, using an existing class, whose info I didn't need to see. Can it be done with the Additional CSS interface built into the theme or do I have to go into the style.css and html to create the boarder? I know the benefit of the Additional CSS interface is having no need to edit the theme files directly whenever the theme is updated.
Bypass Page
Example Page with border - accessible only after bypass page is visited
IMAGE: Example page with Chrome Developer Console open and showing code for area
-------------------- Further Experimentation-------------------------
I created a child theme and am trying to add it that way, but I am missing something (because I'm not a coder), I was able to create the area for the image, but the image isn't showing up. I've tried adding it in the child theme and in the parent theme (editing style.css
and page.php
).
In the page.php
of the child (and the parent) (after the following)
<div class="page-header clearfix">
<div class="tg-container">
I added
<h3 class="title-border"> </h3>
I've tried this in the style.css
of the child:
/*Add Wycinanki Borders*/
.title-border {
background-image: url("https://store.dolina/wp-content/uploads/2020/08/wall-murals-floral-polish-folk-art-pattern-in-square-wycinanki.jpg-e1596302126833.jpg");
background-repeat: repeat-x;
font-weight: 600;
color: #3b3b3b;
font-size: 14px;
line-height: 30px;
margin: 5px 0;
}
I've tried this in the style.css
of the child:
/*Add Wycinanki Borders*/
.page-header .title-border {
background-image: url("https://store.dolina/wp-content/uploads/2020/08/wall-murals-floral-polish-folk-art-pattern-in-square-wycinanki.jpg-e1596302126833.jpg");
background-repeat: repeat-x;
font-weight: 600;
color: #3b3b3b;
font-size: 14px;
line-height: 30px;
margin: 5px 0;
}
I've tried this in the style.css
of the parent:
.page-header .title-border {
background-image: url("https://store.dolina/wp-content/uploads/2020/08/wall-murals-floral-polish-folk-art-pattern-in-square-wycinanki.jpg-e1596302126833.jpg");
background-repeat: repeat-x;
font-weight: 600;
color: #3b3b3b;
font-size: 14px;
line-height: 30px;
margin: 5px 0; }
Again, it has created the space for the image, but the image isn't showing up. I copied the other attributes from the "entry-sub-title", where I was able to put the image successfully, thinking that they would be styled the same way.
Thanks for any insight and helping me learn what I'm doing, hahaha.
Share Improve this question edited Aug 2, 2020 at 21:18 Kazimierz asked Aug 1, 2020 at 19:34 KazimierzKazimierz 112 bronze badges 2 |1 Answer
Reset to default 1Ok, I got it figured out. I added <div class="title-border-top"> </div>
above the page title (and actually added <div class="title-border-bottom"> </div>
below for future modification.
I then added the following in the Additional CSS:
.page-header .title-border-top{
background-image: url("https://store.dolina/wp-content/uploads/2020/08/wall-murals-floral-polish-folk-art-pattern-in-square-wycinanki.jpg-e1596302126833.jpg");
background-repeat: repeat-x;
height: 30px;
margin: 10px;
}
It is working and I hide the entry-sub-title
I had taken over for the border to begin with. Now I have to figure out which page templates WP is pulling for all the main pages, so I can add the html to them.
本文标签: Is there a way to add new div class via a theme39s Additional CSS interface
版权声明:本文标题:Is there a way to add new div class via a theme's Additional CSS interface? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742213120a2434079.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
<h3 class="title-border"> </h3>
element on the page and see how big it is? I'd guess it's too small to see any visible background in, and has possibly been collapsed down to nothing since it only has whitespace in it. Why h3, why not something else for the background? – Rup Commented Aug 3, 2020 at 0:45entry-sub-title
, the area that I was able to add the same border below the page title (akaentry-title
): <br/><div class="tg-container"> <h3 class="title-border"> </h3> <h1 class="entry-title">Contact</h1> <h3 class="entry-sub-title"><div id="crumbs" xmlns:v="http://rdf.data-vocabulary/#"><span typeof="v:Breadcrumb"><a rel="v:url" property="v:title" href="https://store.dolina/pl/">Home</a></span> ⁄ <span class="current">Contact</span></div></h3> </div>
– Kazimierz Commented Aug 3, 2020 at 12:18