Observe the following banner I have:
I want the "My Website" and "Your Go To Stop!" text to align both vertically and horizontally but I'm having difficulty getting that to happen.
JS Fiddle: http://jsfiddle.net/z63234p1/
masthead {
top: 32px;
padding-right: 0px;
background: #000;
padding-left: 0;
max-height: 100px;
border-bottom: none;
position: fixed;
z-index: 3;
width: 100%;
min-height: 73px;
color: #000;
display: block;
box-sizing: inherit;
}
.sidebar-toggle {
float: left;
border: 3px solid grey;
border-right: none;
height: 82px;
margin-right: 0;
width: 5%;
overflow: hidden;
padding: 0;
color: #000;
text-align: center;
}
button {
border-radius: 0;
transition: all 125ms ease-out;
cursor: pointer;
-webkit-appearance: button;
font-size: 100%;
margin: 0;
max-width: 100%;
vertical-align: baseline;
line-height: 1.5;
display: inline-block;
align-items: flex-start;
}
.screen-reader-text {
clip: rect(1px, 1px, 1px, 1px);
position: absolute !important;
height: 1px;
width: 1px;
overflow: hidden;
}
.sidebar-toggle:before {
content: "\f419";
height: 24px;
width: 16px;
color: inherit;
font-size: 16px;
line-height: 24px;
speak: none;
text-decoration: inherit;
vertical-align: top;
font-style: normal;
font-weight: normal
display: inline-block;
font-family: Genericons;
-webkit-font-smoothing: antialiased;
}
.site-branding {
width: 95%;
display: inline-flex;
margin-top: 0;
margin-bottom: 0;
float: left;
max-width: 100%;
}
#sitelogo {
display: inline-flex;
vertical-align: middle;
text-align: center;
}
.site-title {
border: 3px solid grey;
font-family: Impact, Charcoal, sans-serif;
font-weight: normal;
margin: 0 auto;
text-align: center;
line-height: normal;
min-width: 150px;
padding: 3px 8px;
font-size: 6vh;
height: 100%;
color: white;
float: left;
max-width: 100%;
}
h1 {
clear: both;
}
.site-description {
background: #fff500;
color: black;
display: block;
font-family: Impact, Charcoal, sans-serif;
margin: auto auto;
text-align: center;
height: 100%;
border-left: none;
border-top: 3px solid grey;
border-bottom: 3px solid grey;
border-right: 3px solid grey;
display: block;
padding: 0 16px;
font-size: 3vh;
line-height: 2.3;
float: left;
clear: none;
}
<header id="masthead" class="site-header" role="banner">
<button class="sidebar-toggle" aria-expanded="false" ><span class="screen-reader-text"><?php _e( 'Toggle Sidebar', 'boardwalk' ); ?></span></button>
<div class="site-branding">
<div id="sitelogo" class="clear">
<h1 class="site-title">My Website</h1>
<h2 class="site-description">Your Go To Stop</h2>
</div>
</div>
</header>
I'm aware that the image above doesn't look at all like the output of JS Fiddle and I know that what I'm getting on my test site is a fluke rather than the actual output.
Can someone help me get my CSS worked out so that all of the text is vertically aligned within their cells and horizontally aligned accross the logo?
Thank you in advance.
Use this Css:
<style type="text/css">
#masthead {
top: 32px;
padding-right: 0px;
background: #000;
padding-left: 0;
max-height: 100px;
border-bottom: none;
position: fixed;
z-index: 3;
width: 100%;
min-height: 73px;
color: #000;
display: block;
box-sizing: inherit;
}
.sidebar-toggle {
float: left;
border: 3px solid grey;
border-right: none;
height: 73px;
margin-right: 0;
width: 5%;
overflow: hidden;
padding: 0;
color: #000;
text-align: center;
}
button {
border-radius: 0;
transition: all 125ms ease-out;
cursor: pointer;
-webkit-appearance: button;
font-size: 100%;
margin: 0;
max-width: 100%;
vertical-align: baseline;
line-height: 1.5;
display: inline-block;
align-items: flex-start;
}
.screen-reader-text {
clip: rect(1px, 1px, 1px, 1px);
position: absolute !important;
height: 1px;
width: 1px;
overflow: hidden;
}
.sidebar-toggle:before {
content: "\f419";
height: 24px;
width: 16px;
color: inherit;
font-size: 16px;
line-height: 24px;
speak: none;
text-decoration: inherit;
vertical-align: top;
font-style: normal;
font-weight: normal
display: inline-block;
font-family: Genericons;
-webkit-font-smoothing: antialiased;
}
.site-branding {
width: 95%;
display: inline-flex;
margin-top: 0;
margin-bottom: 0;
float: left;
max-width: 100%;
}
#sitelogo {
display: inline-flex;
vertical-align: middle;
text-align: center;
}
.site-title {
border: 3px solid grey;
font-family: Impact, Charcoal, sans-serif;
font-weight: normal;
margin: 0 auto;
text-align: center;
line-height: normal;
min-width: 150px;
padding: 4px 8px;
font-size: 6vh;
height: 100%;
color: white;
float: left;
max-width: 100%;
}
h1 {
clear: both;
}
.site-description {
background: #fff500;
color: black;
font-family: Impact, Charcoal, sans-serif;
margin: auto auto;
text-align: center;
height: 100%;
border-left: none;
border-top: 3px solid grey;
border-bottom: 3px solid grey;
border-right: 3px solid grey;
display: block;
padding: 6px 16px;
font-size: 3vh;
line-height: 2.3;
float: left;
clear: none;
}
</style>
New css for #sitelogo:
display: inline-flex;
align-items: stretch;
New css for .site-title:
border: 3px solid grey;
font-family: Impact, Charcoal, sans-serif;
font-weight: normal;
min-width: 150px;
padding: 3px 8px;
font-size: 6vh;
color: white;
display: flex;
align-items: center;
justify-content: center;
New css for .site-description:
background: #fff500;
color: black;
font-family: Impact, Charcoal, sans-serif;
border-left: none;
border-top: 3px solid grey;
border-bottom: 3px solid grey;
border-right: 3px solid grey;
padding: 0 16px;
font-size: 3vh;
display: flex;
align-items: center;
justify-content: center;
Besides that I strongly suggest to not use vh for font-size.
I messed around with your line height of site-title as well as line height and height of site-description. Here's my result:
masthead {
top: 32px;
padding-right: 0px;
background: #000;
padding-left: 0;
max-height: 100px;
border-bottom: none;
position: fixed;
z-index: 3;
width: 100%;
min-height: 73px;
color: #000;
display: block;
box-sizing: inherit;
}
.sidebar-toggle {
float: left;
border: 3px solid grey;
border-right: none;
height: 82px;
margin-right: 0;
width: 5%;
overflow: hidden;
padding: 0;
color: #000;
text-align: center;
}
button {
border-radius: 0;
transition: all 125ms ease-out;
cursor: pointer;
-webkit-appearance: button;
font-size: 100%;
margin: 0;
max-width: 100%;
vertical-align: baseline;
line-height: 1.5;
display: inline-block;
align-items: flex-start;
}
.screen-reader-text {
clip: rect(1px, 1px, 1px, 1px);
position: absolute !important;
height: 1px;
width: 1px;
overflow: hidden;
}
.site-branding {
width: 95%;
display: inline-flex;
margin-top: 0;
margin-bottom: 0;
float: left;
max-width: 100%;
}
#sitelogo {
display: inline-flex;
vertical-align: middle;
text-align: center;
}
.site-title {
border: 3px solid grey;
font-family: Impact, Charcoal, sans-serif;
font-weight: normal;
margin: 0 auto;
text-align: center;
line-height: 58px;
min-width: 150px;
padding: 3px 8px;
font-size: 6vh;
height: 100%;
color: white;
float: left;
max-width: 100%;
}
h1 {
clear: both;
}
.site-description {
background: #fff500;
color: black;
display: block;
font-family: Impact, Charcoal, sans-serif;
margin: auto auto;
text-align: center;
height: 108%;
border-left: none;
border-top: 3px solid grey;
border-bottom: 3px solid grey;
border-right: 3px solid grey;
display: block;
padding: 0 16px;
font-size: 3vh;
line-height: 3.7;
float: left;
clear: none;
}
.sidebar-toggle:before {
content: "\f419";
height: 24px;
width: 16px;
color: inherit;
font-size: 16px;
line-height: 24px;
speak: none;
text-decoration: inherit;
vertical-align: top;
font-style: normal;
font-weight: normal display: inline-block;
font-family: Genericons;
-webkit-font-smoothing: antialiased;
}
Here's a diff compare to see the differences: http://www.mergely.com/vGQedH1p/ Is this what you were looking for?
Related
I am currently working on a website and I have an element that I have explicitly declared: display: inline-block and visibility: visible however, the element is still invisible. This is only occurring on mobile devices. The invisible element is <div id="clock">.
#font-face {
font-family: 'bitwise';
src: url('bitwise.ttf');
font-display: swap;
}
* {
font-family: 'bitwise', monospace;
margin: 0;
padding: 0;
outline: 0;
}
:root {
background-color: #008080;
}
body,
html,
.wrapper {
width: 100%;
height: 100%;
}
span {
color: #FFFFFF;
font-size: 18pt;
text-align: center;
display: inline-block;
}
h1 {
color: #FFFFFF;
text-align: center;
display: inline-block;
}
input {
font-family: 'bitwise', monospace;
background-color: #535353;
color: #FFFFFF;
font-size: 18pt;
overflow: hidden;
text-align: center;
line-height: inherit;
height: inherit;
}
img:not(.noresize) {
width: 35%;
height: 35%;
}
video {
width: 35%;
height: 35%;
}
a:link {
color: #EFCF7C;
}
a:visited {
color: #105733;
}
button {
background-color: #105733;
border: none;
color: white;
padding: 15px 32px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 18px;
margin: 4px 2px;
}
#back {
background-color: #660000;
border: none;
color: white;
padding: 15px 32px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 18px;
margin: 4px 2px;
}
#taskbar {
position: absolute;
overflow: hidden;
bottom: 0;
width: 100%;
height: 27px;
background-color: silver;
box-shadow: inset 0px 1px #dfdfdf, inset 0px 2px #ffffff;
}
.center {
display: flex;
flex-wrap: wrap;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
text-align: center;
align-items: center;
justify-content: center;
}
#start {
float: left;
}
#clock {
float: right;
position: relative;
text-align: center;
}
#clocktime {
font-family: 'Arial', serif;
font-size: 13px;
color: #000000;
position: relative;
bottom: 23px;
left: 17px;
}
#icons {
padding-top: 8px;
}
#content {
padding-top: 10px;
}
.break {
flex-basis: 100%;
height: 0;
}
#content {
width: 675px;
height: 300px;
}
#media screen and (max-width: 1079px) {
html,
body {
overflow: hidden;
}
#clock {
float: right;
position: relative;
bottom: 100px;
text-align: center;
display: inline-block;
visibility: visible;
}
#clocktime {
font-family: 'Arial', serif;
font-size: 13px;
color: #000000;
position: relative;
bottom: 23px;
left: 17px;
}
}
<div id="taskbar">
<div id="start"><img class="noresize" src="/assets/start.png"></div>
<div id="clock"><img class="noresize" src="/assets/clock.png">
<div id="clocktime"></div>
</div>
</div>
<div id="icons"><img class="noresize" src="/assets/icons.png"></div>
<div class="center"><img class="noresize" src="/assets/ie.png"></div>
<div class="center" id="content">
Content here.
</div>
Screenshot 1 - What the page should look like. Note the clock in the lower-right corner.
Screenshot 2 - What the page actually looks like on mobile.
Screenshot 3 - Chrome DevTools showing the element as being in a visible spot, but still not being visible.
I see that that css is only appliable when max-width is equal to 1079px.
Try to increase that number in inspector element to see what happens.
So it turns out I had overflow: hidden set on #taskbar and this means that any children inside of the taskbar will not display, even if they are in a "visible" area. Adding bottom: 32px to set it inside of the taskbar worked.
Updated CSS:
#taskbar {
position: absolute;
overflow: hidden;
bottom: 0;
width: 100%;
height: 27px;
background-color: silver;
box-shadow: inset 0px 1px #dfdfdf, inset 0px 2px #ffffff;
}
<snip>
#media screen and (max-width: 1079px) {
#clock {
bottom: 32px;
}
}
I have a search box in which there is a button and input for entering text. Please tell me how to embed this button in input, on the right. I know that the input is set to position: relative, and to the absolute button itself. But how to do further I can not understand. I apologize for the long class names.
.middle_content_blog_content_blocks_search_ {
display: block;
height: auto;
}
.middle_content_blog_content_blocks_search {
position: sticky;
top: 50px;
display: flex;
flex-direction: column;
justify-content: space-between;
width: 400px;
height: fit-content;
border: 1px solid #878787;
box-sizing: border-box;
border-radius: 30px;
padding: 25px 25px 25px 25px;
margin: 50px 0 0 0;
}
.middle_content_blog_content_blocks_search_text {
font-family: RobotoCondensed;
font-style: normal;
font-weight: normal;
font-size: 24px;
line-height: 28px;
color: #000000;
}
.middle_content_blog_content_blocks_search_edit {
width: 100%;
height: 50px;
font-size: 16px;
border: 1px solid #878787;
box-sizing: border-box;
border-radius: 30px;
outline: none;
padding: 0 45px 0 20px;
margin: 15px 0 0 0;
}
.middle_content_blog_content_blocks_search_button {
display: flex;
justify-content: center;
align-items: center;
width: 50px;
height: 50px;
border-radius: 20px;
font-family: RobotoCondensed;
font-style: normal;
font-weight: normal;
font-size: 16px;
line-height: 16px;
color: #FFFFFF;
background-color: #B72A20;
cursor: pointer;
user-select: none;
outline: none;
border: none;
}
.search_result_message {
display: inline-flex;
font-family: RobotoCondensed;
font-style: normal;
font-weight: normal;
font-size: 18px;
line-height: 16px;
color: #159815;
margin: 15px 0 0 0;
}
<form class="middle_content_blog_content_blocks_search_">
<label class="middle_content_blog_content_blocks_search_text">
search
</label>
<input type="text" class="middle_content_blog_content_blocks_search_edit" placeholder="search">
<input type="button" class="middle_content_blog_content_blocks_search_button">
<span class="search_result_message"></span>
</form>
Add the following css property to the class .middle_content_blog_content_blocks_search_button,
position: absolute;
right: 6%;
top: 43%;
Snippet as follows,
.middle_content_blog_content_blocks_search_ {
display: block;
height: auto;
}
.middle_content_blog_content_blocks_search {
position: sticky;
top: 50px;
display: flex;
flex-direction: column;
justify-content: space-between;
width: 400px;
height: fit-content;
border: 1px solid #878787;
box-sizing: border-box;
border-radius: 30px;
padding: 25px 25px 25px 25px;
margin: 50px 0 0 0;
}
.middle_content_blog_content_blocks_search_text {
font-family: RobotoCondensed;
font-style: normal;
font-weight: normal;
font-size: 24px;
line-height: 28px;
color: #000000;
}
.middle_content_blog_content_blocks_search_edit {
position: relative;
width: 100%;
height: 50px;
font-size: 16px;
border: 1px solid #878787;
box-sizing: border-box;
border-radius: 30px;
outline: none;
padding: 0 45px 0 20px;
margin: 15px 0 0 0;
}
.middle_content_blog_content_blocks_search_button {
position: absolute;
right: 6%;
top: 43%;
display: flex;
justify-content: center;
align-items: center;
width: 50px;
height: 50px;
border-radius: 20px;
font-family: RobotoCondensed;
font-style: normal;
font-weight: normal;
font-size: 16px;
line-height: 16px;
color: #FFFFFF;
background-color: #B72A20;
cursor: pointer;
user-select: none;
outline: none;
border: none;
}
.search_result_message {
display: inline-flex;
font-family: RobotoCondensed;
font-style: normal;
font-weight: normal;
font-size: 18px;
line-height: 16px;
color: #159815;
margin: 15px 0 0 0;
}
<div class="middle_content_blog_content_blocks_search_">
<div class="middle_content_blog_content_blocks_search">
<div class="middle_content_blog_content_blocks_search_text">
search
</div>
<input type="text" class="middle_content_blog_content_blocks_search_edit" placeholder="search">
<input type="button" class="middle_content_blog_content_blocks_search_button">
<span class="search_result_message"></span>
</div>
</div>
My boss is having me update the company website since I know a little code, but I'm having trouble making the images bigger. This is the html code on the page:
<!----******* The Second Title Section -->
<!--<div style="width: 95%;overflow: hidden; margin:0 auto;" >
<div class="rightProduct">
<p class="partsTitle">Part Numbers and Manufacturers</p>
</div>
</div>-->
<!----******* The main product Section-->
<div class="apartmentInnerWrapper">
<div class="leftProduct">
<div class="flexslider">
<ul class="slides">
<li>
<img src="https://efuses.com/wp-content/uploads/2018/11/copper-bus-bar-500x500.jpg" alt="H05" width="320" height="240"/>
</li>
</ul>
</div>
</div>
<div class="rightProduct">
<br></br> <p class="categoryTitle">Copper Busbar - In Stock and Ready for Immediate Shipment</p>
<p class="communityHeader">
</p>
<div class="fuseDescription">
<span class="fuseDescriptionP">
<br>Cut to Length</br>
<br>Bent and Drilled to Your Specs</br>
<br>Custom Fabrication</br>
</span>
<span><br>
<img src="https://efuses.com/wp-content/uploads/2018/11/H05WhiteBG.jpg" alt="H05" class="myimage" />
<img src="https://efuses.com/wp-content/uploads/2018/11/H02WhiteBG.jpg" alt="H02" class="myimage" /></br>
</span>
<p></p>
<img src="https://efuses.com/wp-content/uploads/2016/06/Express_Shipping-150.png"><span>In Stock Item & Ready to Ship</span>
<p class="chatLink">For Instant Quote - Open the Chat Below<br>
Or Email Us at
<a href="#contact_form_pop" class="fancybox talkPerson" >quote#powerfuse.com</a><br>
Or Call Us at
<span class="number talkPerson">918-665-6888</span>
And here is the CSS script:
/*************
community Page CSS
************/
/* Contact Form */
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 textarea
{
background-color: #fff;
border: 2px solid #2F3396;
color: #000;
width: 90%;
}
.site-header {
display: none;
}
.flexslider {
max-width: 600px;
margin: 0 auto 60px !important;
}
.site-inner {
padding: 0px !important;
max-width: 3000px !important;
}
a {
border-bottom: none !important;
text-decoration: none !important;
}
.communityMobileContainer {
display: none;
}
.communityContainer {
width: 100%;
margin: 0;
padding: 0px 0px 0px 0px;
overflow: hidden;
}
.apartmentInnerWrapper {
width: 85%;
display: block;
margin-left: auto;
margin-right: auto;
overflow: hidden;
padding: 10px 0px 20px 0px;
}
/*********************
Community Header
*********************/
.apartmentBanner {
width: 100%;
overflow: hidden;
display: block;
margin-left: auto;
margin-right: auto;
padding: 10px 0;
}
.topBanner {
background-color: #2F3396;
height: 100px;/*F8C800*/
}
.bottomBanner {
background-color: #C1D0D3;
width: 100%;
padding: 5px 0;
/*position: relative;
top: -40px;*/
}
.bottomBanner a {
color: #2F3396 !important;
}
.apartmentPets,
.apartmentBannerMap,
.apartmentBannerPrice {
float: left;
width: 33%;
text-align: center;
font-weight: 600;
font-size: 16px;
color: #fff;
}
.apartmentPets1,
.apartmentBannerMap1 {
float: left;
width: 25%;
text-align: center;
font-weight: 600;
font-size: 16px;
color: #fff;
}
.apartmentBannerPrice1 {
float: left;
width: 50%;
text-align: center;
font-weight: 600;
font-size: 16px;
color: #fff;
}
.apartmentPets a {
color: #fff;
}
.communityViewMap a {
color: #fff;
}
.talkSection > a{
padding-top: 10px !important;
color: #C1D0D3;
font-size: 30px;
}
.talkSection > a:hover {
color: #fff;
}
.talkSection .powerFuseBottom {
position: relative;
top: -29px;
}
.apartmentBannerMap {
padding-top: 4px;
}
.talkPerson {
font-size: 18px !important;
font-weight: 600 !important;
padding: 5px 10px 5px 0px !important;
border: 0 !important;
top: 0px !important;
color: #c3251d;
text-decoration: underline !important;
}
.communityViewMap .talkPerson {
font-size: 18px !important;
font-weight: 600 !important;
padding: 5px 10px 5px 0px !important;
border: 0 !important;
top: 0px !important;
color: #2F3396;
text-decoration: none !important;
}
a:hover {
color: #000;
cursor: pointer;
}
.apartmentPets {
padding-top: 4px;
}
/* End Banner */
.rightProduct .partsTitle {
margin: 10px 0 0px;
font-size: 24px;
font-weight: 400;
}
.learnAboutFact {
margin: 10px 0 0px;
font-size: 32px;
font-weight: 400;
color: #2F3396;
text-align: center;
display: block;
}
/* Product Desciption */
.communityContainer .categoryTitle {
font-size: 30px;
font-weight: 600;
text-decoration: none;
color: #2F3396;
margin: 0px;
}
.communityContainer .categoryFuseTitle {
font-size: 26px;
font-weight: 600;
text-decoration: none;
color: #2F3396;
margin: 0px;
padding: 35px 0 20px;
}
.communityContainer .leftProduct {
padding: 3px 12px;
width: 45%;
float: left;
overflow: hidden;
}
.communityContainer .leftProduct img {
display: block;
margin-left: auto;
margin-right: auto;
margin-top: 50px;
}
.communityContainer .rightProduct {
padding: 3px 12px;
width: 53%;
float: right;
overflow: hidden;
}
.fuseDescriptionP {
font-size: 22px;
font-weight: 500;
color: #000;
margin-bottom: 0px;
}
.fuseDescriptionP p {
margin-bottom: 0px;
}
.contactUsBanner{
text-align: center;
font-size: 22px;
font-weight: 500;
color: #000;
}
.contactUsBanner a {
padding: 10px 15px;
color: #000;
}
.contactUsBanner a:hover {
color: #2F3396;
}
/* End Product Description */
.communityContainer .communityHeader {
padding: 2px 12px 0 0;
margin: 0 0 0 0;
width: 100%;
float: left;
text-align: left;
}
.communityContainer .communityHeader .communityTitle {
font-size: 30px;
font-weight: 600;
text-decoration: none;
color: #2F3396;
}
.communityContainer .fuseDescription p {
font-size: 16px;
}
/*********************
Community Description Section
*********************/
.communityContainer .fuseDescription{
width: 100%;
overflow: hidden;
padding: 0px 10px 5px 0px;
}
.communityContainer .fuseDescription myimages {
width: 400px;
height: 300px;
}
.communityContainer .fuseDescription span {
font-size: 20px;
font-weight: 400;
position: relative;
top: -15px;
padding: 0 0 0 15px;
}
.communityContainer .fuseDescription .chatLink {
font-size: 24px;
font-style: italic;
font-weight:600;
margin-bottom: 2px;
}
.communityContainer .fuseDescription p{
font-size: 16px;
}
.communityDescriptionHalf {
float: left;
width: 48%;
padding: 0px 4px;
}
.communityDescriptionThird {
float: left;
width: 32%;
padding: 0px 4px;
}
.communityDescription .communityPlansTitle {
padding: 3px 0 20px 0px;
width: 100%;
display: block;
clear: left;
}
.communityPlansDataLeft,
.communityPlansDataRight {
width: 48%;
float: left;
font-size: 16px;
font-weight: 400;
padding: 0 10px!important;
}
.communityPlansInfo h4{
font-size: 24px;
color: #004c71;
margin: 5px 0 2px 0 !important;
padding: 0 10px!important;
font-weight: 700;
text-align: center;
}
.communityPlansInfo p {
font-size: 18px;
margin: 0px 0 4px 0 !important;
padding: 0 10px!important;
font-weight: 600;
color: #000;
}
/* Footer */
.footer-widgets {
padding: 0px;
background-color: #C1D0D3;
}
.footer-widgets .wrap {
padding: 0px;
margin: 0px;
max-width: 3000px;
color: #fff;
}
.footer-widgets .wrap a {
padding: 0px;
margin: 0px;
max-width: 3000px;
color: #fff;
}
.footer-widgets-1 {
width: 100%;
float: left;
padding: 20px 4%;
text-align: center;
margin: 0px;
font-size: 22px;
color: #2F3396;
}
.footer-widgets-1 p {
margin-top: 5px;
margin-bottom: 20px;
}
.footer-widgets-1 .widgettitle {
text-align: center;
color: #2F3396;
}
.footer-widgets-2 {
width: 50%;
float: left;
padding: 20px 4% 0px;
margin: 0px;
font-size: 18px;
color: #2F3396;
}
.footer-widgets-2 .widgettitle {
color: #2F3396;
}
.footer-widgets-1 a:hover,
.footer-widgets-2 a:hover {
color: #000;
}
.footer-widgets-3{
width: 20%;
float: left;
padding: 20px 4% 0px;
margin: 0px;
font-size: 18px;
}
.footer-widgets-3 .widgettitle {
color: #2F3396;
}
.footer-widgets .widget {
margin-bottom: 10px;
}
.widgettitle {
text-align: center;
padding-top: 10px;
margin-bottom: 10px;
font-size: 32px;
}
.site-footer {
background-color: #23282D;
color: #fff;
}
.site-footer a {
color: #fff;
}
/*********************
Mobile CSS
*********************/
#media (max-width: 1000px) {
.communityContainer .communityPhone {
text-align: center;
width: 100%;
padding: 12px 0;
clear: both;
}
.footer-widgets-1,
.footer-widgets-2,
.footer-widgets-3{
width: 100%;
clear: left;
text-align: center;
}
.widgettitle {
text-align: center !important;
padding-top: 20px;
}
.communityContainer .communityUrl {
text-align: center;
width: 100%;
padding: 12px 0;
clear: both;
}
}
#media (max-width: 800px) {
.apartmentInnerWrapper {
width: 100%;
padding-top: 25px;
}
.topBanner {
height: 190px;
}
.apartmentPets,
.apartmentBannerPrice,
.apartmentBannerMap {
clear: left;
width: 100%;
text-align: center;
font-weight: 600;
font-size: 18px;
}
.communityDescriptionHalf {
clear: left;
width: 100%;
}
.communityDescriptionThird {
clear: left;
width: 100%;
}
.communityContainer .leftProduct {
clear: both;
width: 100%;
}
.communityContainer .rightProduct {
clear: both;
width: 100%;
padding: 0 0 25px 0;
}
.communityContainer .communityHeader {
width: 100%;
}
.communityContainer .communityHeader .communityBuilder {
padding: 6px 3px;
}
}
#media (max-width: 700px) {
.communityMobileContainer {
display: inline-block!important;
}
.communityContainer {
display: important;
}
#communityPlansAll {
width: 100%;
max-width: 500px;
margin: 2px auto 2px auto;
}
/*********************
End Mobile CSS
*********************/
}
/*******************
*******************
Fuse Category Page
*******************
*******************/
.allAgentsWrapper {
width: 100%;
padding: 0 0 75px;
overflow: hidden;
}
.allAgentsWrapper .allAgents {
width: 100%;
margin: 0 auto;
max-width: 1000px;
overflow: hidden;
padding: 40px 0;
list-style: none;
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
-webkit-flex-flow: row wrap;
justify-content: space-around;
}
.singleAgent {
padding: 20px 10px;
width: 200px;
height: auto;
}
.singleAgent .bpTitle{
text-align: center;
font-size: 16px;
padding-bottom: 0px;
margin-bottom: 0px;
margin-top: 7px;
color: #606060;
font-family: Oswald,Tahoma,Arial,sans-serif;
}
.singleAgent .bpImg {
width: 100%;
height: auto;
border: 1px solid #f6f6f6;
}
.singleAgent .fuseImageWrapper {
overflow: hidden;
min-height: 144px;
}
.singleAgent .bpDesc p {
font-size: 12px;
font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif;
line-height: 17px;
text-align: justify;
font-size: 12px;
margin-top: 5px;
margin-bottom: 5px;
}
.singleAgent .AgentTop {
width: 100%;
padding: 5px 0;
}
.singleAgent .AgentTop .leftTop {
float: left;
width: 50%;
margin: 0;
padding: 5px 0;
}
.singleAgent .AgentTop .rightTop {
float: right;
width: 50%;
margin: 0;
padding: 5px 0;
}
.singleAgent .bpPrice {
font-size: 16px;
text-align: center;
padding: 5px 0 0;
letter-spacing: 1px;
font-family: Oswald,Tahoma,Arial,sans-serif;
}
.singleAgent .bpLink {
padding: 7px 11px;
float: right;
font-size: 16px;
font-weight: 600;
color: #fff;
font-weight: 400;
text-decoration: none;
background-color: #faab37;
border-radius: 0;
font-family: Oswald,Tahoma,Arial,sans-serif;
text-shadow: 1px 1px rgba(0,0,0,.25);
border: 0;
outline: 0;
-moz-transition: all .2s ease-in;
-o-transition: all .2s ease-in;
-webkit-transition: all .2s ease-in;
transition: all .2s ease-in;
}
.singleAgent .bpLink:hover {
background-color: #000;
}
.singleAgent .bpIcons {
list-style: none;
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
-webkit-flex-flow: row wrap;
justify-content: center;
}
.singleAgent .bpIcon i {
font-size: 18px;
padding: 0 5px;
}
/* Single Agent Page */
.singleWrapper .topImage {
padding: 15px;
}
.singleWrapper .topSection {
padding: 5px 15px 15px;
}
.singleWrapper .topSection .bpTitle {
padding: 5px 0;
}
.singleWrapper .topSection .bpDesc {
padding: 5px 0 15px;
}
.singleWrapper .topSection .bpLink {
float: left;
padding: 7px 11px;
margin-top: 10px;
font-size: 16px;
font-weight: 600;
color: #fff;
font-weight: 400;
text-decoration: none;
background-color: #faab37;
border-radius: 0;
font-family: Oswald,Tahoma,Arial,sans-serif;
text-shadow: 1px 1px rgba(0,0,0,.25);
border: 0;
outline: 0;
-moz-transition: all .2s ease-in;
-o-transition: all .2s ease-in;
-webkit-transition: all .2s ease-in;
transition: all .2s ease-in;
}
.singleWrapper .topSection .bpPrice {
margin-left: 10px;
float: left ;
color: #606060;
font-size: 20px;
padding: 16px 0 0;
letter-spacing: 1px;
font-family: Oswald,Tahoma,Arial,sans-serif;
}
.singleWrapper .leftImage {
max-width: 300px;
}
.singleWrapper .rightSection {
max-width: 500px;
}
.singleWrapper .bpIcon i {
font-size: 22px;
padding: 0 5px 15px;
}
I tried adding this bit of code to the Community Description Section on the CSS file to see if it would work but it didn't.
.communityContainer .fuseDescription myimages {
width: 400px;
height: 300px;
}
Basically I'm flummoxed. Any help would be appreciated.
Here is a link to the page:
https://efuses.com/copperbusbar/
The two images in question are underneath the words Custom Fabrication.
Thanks!
I am inferring that since you have 2 images, you want to align them next to each other and have them occupy roughly half of the available space each. So a solution could be:
.communityContainer .fuseDescription img { display: inline-block; width: 49%; height: auto; }
First, you need a selector that correctly references and overwrites the current context, hence the 2 classes and an element. Then, displaying the images as inline-blocks allows them to respect the width and height specifications in all browsers. A width of 49% makes sure they both fit in a row snugly without pressing the outer margins. Height auto insures they keep their original proportion and don't get skewed.
Your error was the myimages selector which doesn't really exist in CSS, except if you wanted to specify the class name .myimages which would have also worked. The difference in approaches when using percentages vs pixels is the fact that the percentages adapt to the screen real estate available in varying contexts and browser sizes.
There are some other more advanced solutions based on the CSS grid specification that do the same trick for a variable amount of images on one "line" but I'm guessing you don't need that sort of complexity to solve this particular issue. :)
I have a problem converting html page into wordpress theme. When loading theme i just see white screen but other previously installed theme looks normal. I read earlier similar subject on stackoverflow but it seems that it doesnt help me. Can somebody help me solve this problem?
These are my theme files:
Theme Name: Vesti
Theme URI: www.komunalacbecej.com
Author: Aljosa Boskovic
Author URI: www.komunalacbecej.com
Description: Twenty Seventeen brings your site to life with immersive featured images and subtle animations. With a focus on business sites, it features multiple sections on the front page as well as widgets, navigation and social menus, a logo, and more. Personalize its asymmetrical grid with a custom color scheme and showcase your multimedia content with post formats. Our default theme for 2017 works great in many languages, for any abilities, and on any device.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: twentyseventeen
*/
* {
margin: 0;
padding: 0;
}
body{
width: 960px;
margin: 0 auto;
background-color: #faf6d0;
padding: 0;
//background-image: url('images/green.png');
background-size: cover;
}
header{
display: block;
width: 100%;
margin: 0 auto;
}
#uppermenu{
float: right;
margin-top: 4px;
}
#uppermenu ul{
margin-right: 15px;
}
#uppermenu ul li{
display: inline;
padding: 5px;
font-size: 15px;
color: grey;
font-weight: 540;
font-family: 'Oswald', sans-serif;
cursor: pointer;
}
#uppermenu ul li:hover{
color:#156038;
}
#flags{
float:right;
margin-top: 4px;
}
#flags img{
width: 20px;
height: 20px;
margin-right: 7px;
cursor: pointer;
}
#logo{
vertical-align: middle;
float: left;
height: 70px;
}
#naziv{
float: left;
color: #1a7645;
height: 70px;
width: 300px;
box-sizing: border-box;
padding: 5px;
font-family: sans-serif;
}
nav{
width: 100%;
background: #3d874d;
text-align: center;
position: relative;
z-index: 11;
border: 2px solid #a4a41b;
margin: 0 auto 10px auto;
clear: both;
border-radius: 2px;
}
nav ul{
list-style: none;
}
nav ul li{
display: inline-block;
padding: 15px;
cursor: pointer;
font-family: 'Oswald', sans-serif;
}
nav ul li a{
text-decoration: none;
color: #fff;
display: block;
font-size: 1.1em;
}
nav ul li:hover{
background: #150;
}
nav ul li a:hover{
color: #fdf742;
}
nav ul ul {
position: absolute;
width: 150px;
background: #2a562c;
opacity: 0.8;
margin-top: 15px;
margin-left: -15px;
text-align: left;
display: none;
}
nav ul ul li{
display: block;
text-align: left;
border-bottom: 1px solid #5b7e5d;
}
nav ul li:hover > ul{
display: block;
}
#slide{
width: 100%;
height: 500px;
position: relative;
z-index: 2;
margin: 0 auto;
}
#slidephoto{
width: 100%;
height: 500px;
position: relative;
z-index: 2;
border-radius: 5px;
}
#leftbutton{
width: 5%;
height:500px;
position: absolute;
left: 0;
top: 0;
background: #b3b0b0;
opacity: .5;
line-height: 500px;
z-index: 4;
border-radius: 5px;
}
#rightbutton{
width: 5%;
height:500px;
position: absolute;
right: 0;
top: 0;
background: #b3b0b0;
opacity: .5;
line-height: 500px;
z-index: 4;
border-radius: 5px;
}
#leftarrow {
vertical-align: middle;
cursor: pointer;
}
#rightarrow {
vertical-align: middle;
cursor: pointer;
}
#leftarrow:hover{
background: grey;
}
#rightarrow:hover{
background: grey;
}
#naslov{
width: 100%;
text-align: left;
margin-left: auto;
margin-right: auto;
letter-spacing: 1px;
text-indent: 30px;
font-size: 20px;
color: #1a7645;
font-family: Georgia;
border-top: 1px solid #1a7645;
background: #639665;
color: #e6f3d1;
padding: 10px 0;
}
#firsttext{
width: 100%;
margin: 30px auto 0 auto;
font-family: 'Times New Roman';
line-height: 1.4em;
font-size: 19px;
text-align: justify;
padding-top: 10px;
box-sizing: border-box;
padding: 40px 90px;
color: white;
background: #6eae49;;
border-radius: 4px;
}
#firsttext span{
font-size: 28px;
font-weight: bold;
color: #1a7645;
}
#delatnosti {
width: 100%;
position: relative;
text-align: center;
background-color: #e6f3d1;
margin: 0px auto;
box-sizing: border-box;
border: 1px solid #6d9e6f;
padding: 20px ;
}
.boxes div {
display: inline-block;
border: 1px solid #a2b6c0;
width: 200px;
height: 210px;
vertical-align: top;
text-align: center;
background-color: white;
color: #46545b;
margin: 20px 10px;
cursor: pointer;
border-radius: 4px;
}
.boxes div:hover{
border: 1px solid green;
background-color: #dfdede;
}
.boxes a img{
width: 200px;
height: 110px;
}
.boxes a p, h3{
//margin: 5px;
text-decoration: none;
}
.boxes div a{
text-decoration: none;
color: black;
}
#obavestenja{
width: 100%;
height: 40px;
//border: 1px solid black;
font-size: 2em;
line-height: 40px;
text-indent: 210px;
}
#mainnews-banner{
width: 100%;
margin: 0 auto;
}
#mainnews-banner h1{
text-indent: 210px;
font-family: serif;
letter-spacing: 3px;
}
#sadrzaj{
width: 75%;
background-color: white;
display: inline-block;
box-sizing: border-box;
text-align: justify;
border: 1px solid black;
}
#vestikolone{
width: 80%;
}
#glavnavestslika{
width: 100%;
height: 430px;
background: url("images/slika4.jpg");
background-size: cover;
background-repeat: no-repeat;
position: relative;
}
#glavnavesttekst{
width: 100%;
height: 180px;
background: black;
position: absolute;
bottom: 0;
opacity: .6;
}
#glavnavesttekst p{
color: #ded8d8;
opacity: 1;
padding: 10px;
font-size: 18px;
font-family: Georgia;
line-height: 23px;
}
#glavnavesttekst h2{
color: white;
font-weight: bold;
opacity: 1;
font-family: Georgia;
text-indent: 10px;
margin-top: 10px;
margin-bottom: 10px;
}
#glavnavest {
font-size: 1.2em;
font-family: 'Oswald', sans-serif;
}
#datum{
width: 100%;
padding: 10px;
box-sizing: border-box;
color: white;
background: black;
}
#banner{
width: 25%;
float: right;
text-align: center;
//border: 3px solid green;
//background: #f1f1f1;
}
#banner img{
width: 120px;
height: 100px;
background: #9ac0f6;
border: 1px solid #9ac0f6;
cursor: pointer;
}
#banner p{
font-size: 1em;
font-family: Arial;
background: #fecd61;
width: 60%;
margin: 0 auto;
margin-bottom: 8px;
cursor: pointer;
font-family: 'Oswald', sans-serif;
}
#pastnewspara{
text-transform: uppercase;
background-color: black;
color: white;
width: 75%;
box-sizing: border-box;
padding-left: 10px;
margin-bottom: 1px;
opacity: .9;
}
#pastnews{
border-top: none;
position: relative;
text-align: center;
width:75%;
height: 140px;
float: left;
border: 1px dashed black;
border-top: none;
}
.column{
width: 25%;
height: 140px;
display: inline-block;
margin-left: -4px;
background-color: white;
box-sizing: border-box;
vertical-align: top;
box-sizing: border-box;
}
.column img{
width: 100%;
height:140px;
}
.column h3,p{
text-align: left;
padding: 5px;
}
#prognoza{
clear: both;
width: 75%;
background: brown;
color: #a2b6c0;
border-bottom: 2px solid white;
}
.weatherwidget-io{
width: 100%;
display: block;
height: 20px;
text-align: left;
}
#footer{
width: 100%;
height: 130px;
background: white;
background: #a2b6c0;
text-align: center;
position: relative;
border-top: 3px solid white;
}
#icons{
line-height: 130px;
}
#footer i{
color: #554f4f;
font-size: 36px;
padding: 26px;
vertical-align: middle;
}
#footer span {
position: absolute;
right: 50px;
color: grey;
font-family: sans-serif;
}
#footer span i{
padding: 6px;
color: grey;
font-size: 0.6em;
}
/* stranica zelenilo.html */
#submenu ul li{
list-style: none;
font-size: 1.1em;
padding-bottom: 5px;
border-bottom: 2px solid green;
margin-bottom: 13px;
background: rgba(96,96,96,0.4);
}
#submenu {
margin-top: 30px;
width: 22%;
background: url('images/leaf3.jpg');
background-size: cover;
opacity: .9;
font-family: 'Oswald', sans-serif;
text-align: center;
border-top-right-radius: 20px;
border-bottom-right-radius: 20px;
padding: 10px 0;
color: #cfcf05;
border: 2px solid green;
float: left;
}
#submenu ul {
opacity: 1;
padding: 40px 20px;
font-size: 16px;
}
#zelenilobody{
background: url('images/goranski.jpg');
background-size: cover;
height: 1000px;
}
#submenu ul li:hover{
background-color: grey;
background: rgba(96,96,96,0.7);
color: white;
cursor: pointer;
}
#navigation nav{
background-color: #61a239;
}
#zelenilo-naziv #naziv{
color: #60a23a;
background-color: rgba(96,96,96,0.7);
}
#zelenilo-uppermenu #uppermenu li{
color: #60a23a;
background-color: rgba(96,96,96,0.8);
}
#zelenilo-tekst{
width: 75%;
float: right;
margin-top: 30px;
border: 1px solid white;
background: rgb(246, 241, 241, 0.8);
box-sizing: border-box;
padding: 20px;
}
#zelenilo-tekst p{
line-height: 20px;
margin-top: 10px;
font-size: 17px;
}
#zelenilo-tekst ol{
padding-left: 20px;
line-height: 24px;
margin-top: 15px;
font-size: 17px;
}
/* stranica vesti.php */
#blognews {
background-color: white;
margin-top: 20px;
padding: 10px;
border: 1px solid black;
}
#article {
border: 1px solid black;
margin-top: 20px 0;
}
#article h2 {
margin-left: 15px;
margin-top: 10px;
}
#datumclanka{
display: block;
margin-left: 15px;
}
#article img{
height: 120px;
display: inline-block;
width: 180px;
vertical-align: middle;
margin-top: 10px;
margin-left: 10px;
padding-bottom: 10px;
}
#article p{
display: inline-block;
width: 650px;
vertical-align: middle;
font-size: 1.1em;
margin-left: 10px;
}
header.php
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title><?php bloginfo('title'); ?></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://fonts.googleapis.com/css?family=Oswald" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link href="<?php bloginfo('stylesheet_url'); ?>" rel="stylesheet" type="text/css" />
<?php wp_head(); ?>
</head>
<body>
<header>
<img src="images/logofirme.jpg" id="logo">
<div id="naziv">
<h1><?php bloginfo('name'); ?></h1>
<p>Javno preduzeće za komunalne usluge</p>
</div>
<div id="flags">
<img src="images/serbia.png">
<img src="images/hungary.png">
</div>
<div id="uppermenu">
<ul>
<li>Najčešća pitanja</li>
<li>Korisni linkovi</li>
</ul>
</div>
<?php wp_nav_menu(); ?>
</header>
footer.php
<div id="footer">
<div id="icons">
<i class="fa fa-phone"></i>
<i class="fa fa-envelope-o"></i>
<i class="fa fa-facebook-official"></i>
<span><i class="fa fa-copyright"></i>Design by Aleksey</span>
</div>
</div>
</body>
</html>
index.php
<?php get_header(); ?>
test
<?php get_footer(); ?>
Can you try following solutions?
In first line of style.css add "/*" before "Theme Name: Vesti". So it will be like
/*
Theme Name: Vesti
Disable/deactivate all plugins to check if confliction happens between your active theme and plugins. And then enable it one by one if issue happens because of it.
Add following line in wp-config.php file for increasing PHP memory limit.
define(‘WP_MEMORY_LIMIT’, ’64M’);
My body on my site is smaller on all edges for some reason, i have no idea why, here is my site to preview what the spaces / edges are doing: csgodice.co.uk, here is my css code, if you need my html i will edit it and add the html but i think its the css:
CSS:
#font-face{
font-family: "coolvetica"; /* You can name the font whatever you like here */
src: url('fonts/coolvetica rg.ttf') format('truetype'); /* Font directory and format */
}
#header {
margin-right: 50px;
height: 6%;
width: 100%;
border-radius: 3px;
background-color: #FA5858;
}
#logo {
height: 60px;
width: 250px;
}
#steamLogon {
float: right;
margin-top: 0px;
}
#navbar {
float: right;
margin-top: 13px;
margin-right: 100px;
}
#navbar a {
margin-left: 50px;
height: 20px;
width: 70px;
display: align-block;
font-weight: 200;
font-size: 22px;
text-align: center;
text-decoration: none;
color: white;
font-family: coolvetica;
}
#navbar .dropdown {
margin-left: 50px;
height: 20px;
width: 70px;
display: align-block;
font-weight: 200;
font-size: 22px;
text-align: center;
text-decoration: none;
color: white;
font-family: coolvetica;
}
.logout {
font-family: coolvetica;
background-color: #e6e6e6;
font-weight: 300;
height: 25px;
width: 160px;
border: 2px solid #f2f2f2;
}
.logout:hover {
font-family: coolvetica;
font-weight: 300;
font-size: 14px;
color: #262626;
height: 25px;
width: 160px;
background-color: #FA5858;
border: 2px solid #f2f2f2;
}
.account {
font-family: coolvetica;
font-size: 14px;
color: #262626;
height: 20px;
margin: auto;
width: 153px;
background-color: #e6e6e6;
border: 2px solid #f2f2f2;
}
.account:hover {
font-family: coolvetica;
font-size: 14px;
color: #262626;
height: 20px;
width: 153px;
background-color: #FA5858;
border: 2px solid #f2f2f2;
}
/* Dropdown Button */
.dropdown-content {
display: none;
border-radius: 3px;
position: absolute;
height: 45px;
background-color: #f9f9f9;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
}
.dropdown-content a:hover {background-color: #f1f1f1}
.dropdown-toggle:hover .dropdown-content {
display: block;
}
#diceholder {
height: 50%;
width: 85%;
margin: auto;
margin-top: 100px;
background-color: #404040;
}
/* Account.php */
.trade-url {
display: align-block;
font-family: coolvetica;
font-size: 24px;
color: #1a1a1a;
margin-top: 50px;
text-align: center;
margin-left: auto;
margin-right: auto;
}
I assume you mean that the body has a margin and you'd like to remove it - if so, try adding this CSS:
body {
margin: 0;
}