I am building a website and I have three ads towards the bottom of my page. They appear but on there own line. I have tried everything from creating a floating div to removing divs. But I can't seem to figure out what part of the CSS isn't allowing these boxes to be straight across the page.
Here is the code for the three boxes:
<div class="wrapper margin-bot1">
<div class="bg-3">
<div class="indent">
<div class="wrapper margin-bot">
<img src="http://www.webstertoolbox.com/media/wysiwyg/images/page1_img1.png" alt="" />
<img src="http://www.webstertoolbox.com/media/wysiwyg/images/logo_archilume.png" alt="" width="150" height="41" />
</div>
<ul class="ul-1">
<li>Made in USA </li>
<li>Expert Domestic Tech Support</li>
<li>High-end installations</li>
<li>Robust features</li>
</ul>
<a class="button-1 margin-left" href="more.html">Click to Order Now!</a>
</div>
</div>
<div class="bg-3">
<div class="indent">
<div class="wrapper margin-bot">
<img src="http://www.webstertoolbox.com/media/wysiwyg/images/page1_img1.png" alt="" />
<img src="http://www.webstertoolbox.com/media/wysiwyg/images/GenLume-Logo.png" alt="" width="103" height="41" />
<div class="extra-wrap"> </div>
</div>
<ul class="ul-1">
<li><a class="test123" href="moreGEN.html">Quick solutions</a></li>
<li>Turn-key applications</li>
<li>Certified</li>
<li>Competitive pricing</li>
</ul>
<a class="button-1 margin-left" href="moreGEN.html">Click to Order Now!</a>
</div>
</div>
<div class="bg-3">
<div class="indent">
<div class="wrapper margin-bot">
<img src="http://www.webstertoolbox.com/media/wysiwyg/images/page1_img1.png" alt="" />
<div class="extra-wrap">
<h4>DuraLume</h4>
<h5>Series</h5>
</div>
</div>
<ul class="ul-1">
<li>Expert Domestic Tech Support</li>
<li>Made in USA </li>
<li>Custom solutions</li>
<li>On-site Engineers</li>
</ul>
<a class="button-1 margin-left" href="more.html">Click to Order Now!</a>
</div>
</div>
</div>
I can't figure out how to properly show the CSS but you can find the actual site here: http://www.webstertoolbox.com/
If you look below the Big banner you will see an ArchiLume, GenLume and DuraLume boxes that run vertically down the page. I want them to appear across the page.
Can someone please tell me what I did wrong and how to fix it?
Thanks,
Frank G.
Very easy and fast to fix it.
Just change your css file named homeads.css on line 128:
.bg-3
{
background: url(../images/bg-4.png) left top no-repeat;
width: 33%; // Changed this from 100% to 33%
height: 322px; //Changed from 268px to 322px
overflow: hidden;
float: left; // Added the float left
}
Cheers,
Thanos
EDIT: After doing the change above you will need to add a couple more changes to fix a couple of things that will get a bit misaligned.
Such as the right border will not be visible anymore. Below are the changes you will need to do to fix that as well.
On homeads.css line 33:
.main
{
width: 950px; // Reduced this to match with the parent's width
padding: 0;
margin: 0 auto;
position: relative;
}
On sceleton.css line 25:
.grid_1, .grid_2, .grid_3, .grid_4, .grid_5, .grid_6, .grid_7, .grid_8, .grid_9, .grid_10, .grid_11, .grid_12, .grid_13, .grid_14, .grid_15, .grid_16, .grid_17, .grid_18, .grid_19, .grid_20, .grid_21, .grid_22, .grid_23, .grid_24
{
float: left;
display: inline;
//margin-left: 5px; Remove these 2
//margin-right: 5px; Remove these 2
}
EDIT2: The first box is getting pushed down a little bit. That is caused because on the first box you are missing a div <-> on the second and third box you have an extra div inside them.
<div class="wrapper margin-bot">
<img src="http://www.webstertoolbox.com/media/wysiwyg/images/page1_img1.png" alt=""> <img src="http://www.webstertoolbox.com/media/wysiwyg/images/duralume.gif" alt="" width="103" height="41">
<div class="extra-wrap"> </div> // THIS IS THE EXTRA DIV
</div>
You have 2 choices here:
1) Add the div
<div class="extra-wrap"> </div>
to the first box
2) Remove that div from box 2 and 3.
.cms-home class help you do not affect other pages layout. Add in your stylesheets:
.cms-home .wrapper {
overflow: visible; //For big banner
}
.cms-home .bg-3 {
overflow: visible;
width: 33%;
display: inline-block;
}
Related
I am trying to move content within the first site-header-section child to the left as there is too much gap on the left hand side but I can't seem to shift it. What am I missing?
<div class="site-header-primary-section-left site-header-section ast-flex site-header-section-left">
<div class="ast-builder-layout-element ast-flex site-header-focus-item" data-section="title_tagline">
<div class="site-branding ast-site-identity" itemtype="https://schema.org/Organization" itemscope="itemscope">
<span class="site-logo-img"><img width="106" height="80" src="https://puffpastrydelights.com/wp-content/uploads/2021/04/puff-pastry-dellight.png" class="custom-logo" alt="Puff Pastry Delight" loading="lazy" srcset=""><img width="106" height="80" src="https://puffpastrydelights.com/wp-content/uploads/2021/04/puff-pastry-dellight-1.png" class="custom-logo" alt="" loading="lazy"></span>
<div class="ast-site-title-wrap">
<h1 class="site-title" itemprop="name">
<a href="https://puffpastrydelights.com/" rel="home" itemprop="url">
Pastry Delights
</a>
</h1>
<p class="site-description" itemprop="description">
Made with love, served with pride
</p>
</div>
</div>
<!-- .site-branding -->
</div>
<div class="ast-builder-layout-element ast-flex site-header-focus-item ast-header-html-1" data-section="section-hb-html-1">
<div class="ast-header-html inner-link-style-">
<div class="ast-builder-html-element">
<ul class="additional-menu">
<li></li>
<li></li>
<li></li>
</ul>
</div>
</div>
</div>
</div>
CSS:
.site-header-section:first-child{
display: flex;
flex-direction: column;
justify-content: flex-start;
align-content: flex-start;
margin:0;
padding:0;
}
While it's not a completely responsive solution, you could resort to using
.site-header-section:first-child {
position: relative;
left: 0;
}
This should just move the div to be stuck against the left side of the screen. If that's to far left, try a higher value than 0 for the 'left' property, such as 10px.
You have padding-left: 20px in the div with this class names ast-primary-header-bar ast-primary-header main-header-bar site-primary-header-wrap site-header-focus-item ast-builder-grid-row-layout-default ast-builder-grid-row-tablet-layout-default ast-builder-grid-row-mobile-layout-default. If you cancel that, it would solve your problem.
I just want to thank everyone for being so helpful, I would of never learnt so much if it wasn't for your guys continual helpfulness.
I'm trying to make a 4 way vertical "collage" of some images without spaces between each picture that is fully responsive when resizing the window and such. The problem I'm having is with space between each photo; I'm trying to figure out how to allow no space between each.
I also encounter a problem when resizing the window to be smaller in which the images flow away from the lion image above and make more white space or padding without sticking to the lion image. It also starts to overlap the lion image when resizing to a bigger size.
.image {
background-image: url(https://s-media-cache-ak0.pinimg.com/originals/31/91/d7/3191d75f03ba7d4c570358870c855ed7.jpg);
background-repeat: no-repeat;
height: 850px;
background-size: 100%;
}
#collage {
width: 90%;
}
<div class="image">
<ul id="nav">
<li id="brand">MINIMAL</li>
<li id="navm">Men</li>
<li id="navm">Women</li>
<li id="navm">Contact</li>
</ul>
<h1>Simplicity is Minimal</h1>
<div id="home">
Shop Now
</div>
</div>
<div class="row">
<div class="col-md-3" align="center">
<img id="collage" src="https://upload.wikimedia.org/wikipedia/commons/2/27/Panthera_tiger_in_a_marshy_area_in_captivity.jpg">
</div>
<div class="col-md-3" align="center">
<img id="collage" src="https://upload.wikimedia.org/wikipedia/commons/2/27/Panthera_tiger_in_a_marshy_area_in_captivity.jpg">
</div>
<div class="col-md-3" align="center">
<img id="collage" src="https://upload.wikimedia.org/wikipedia/commons/2/27/Panthera_tiger_in_a_marshy_area_in_captivity.jpg">
</div>
<div class="col-md-3" align="center">
<img id="collage" src="https://upload.wikimedia.org/wikipedia/commons/2/27/Panthera_tiger_in_a_marshy_area_in_captivity.jpg">
</div>
</div>
You need to just add below css and I hope it works.-
*{
margin:0px;
padding:0px;
}
.image {
height: auto;
}
body img {
display: block;
}`
I'm using bootstrap grid as shown below and I'm trying to centralize some divs. ( pic). I've tried everything {margin:0 auto; width:50% } etc etc but I can't work it out. It can't be that difficult to centralize some divs. What's the problem here? Please don't mark it as a duplicate. I've been researching the whole day, I just can't work it out.
Thank you
<header data-spy="affix" id="myHeader" class="container row">
<div class="col-sm-4 ">
<div class="centralize">
<a href="http://www.facebook.com" target="_blank">
<img class="logos" src="images/facebook.png" onmouseover="zoomin(this.id)" onmouseout="zoomout(this.id)">
</a>
<a href="http://www.twitter.com" target="_blank">
<img class="logos" src="images/twitter.png" onmouseover="zoomin(this.id)" onmouseout="zoomout(this.id)">
</a>
<a href="http://www.instagram.com" target="_blank">
<img class="logos" src="images/instagram.png" onmouseover="zoomin(this.id)" onmouseout="zoomout(this.id)">
</a>
</div>
</div>
<div class="col-sm-4">
<div class="centralize">
//Other Stuff to be centralized
</div>
</div>
<div class="col-sm-4">
<div class="centralize">
//Other Stuff to be centralized
</div>
</div>
</header>
Actually with {margin:0 auto; width:50%} it should work.
But in your code I see that you are using the .col-sm-4 class on the parent div that only takes 1/3 of the width. It might work with .col-sm-12 instead that takes 100%
To center align the content within the class="centralize" divs, use:
.centralize {
text-align: center;
}
I have built a donate page with a header (the picture currently inserted in the header is a generic placeholder). When I load this page on an iPhone or Android, it looks great at first. But when I scroll down to view the rest of the page and then scroll back up, the header is missing for a second, and then it appears again as originally rendered.
I want to make it so that when I scroll away from the header it stays there and doesn't have to reload when I scroll back up to it.
Here is the code:
.container_12 {
margin-left: auto;
margin-right: auto;
width: 1200px;
}
#student_dashboard .container_12 .grid_12 {
width: 100%;
}
.container_12 .grid_12 {
width: 90.5%;
}
.grid_1, .grid_2, .grid_3, .grid_4, .grid_5, .grid_6, .grid_7, .grid_8, .grid_9, .grid_10, .grid_11, .grid_12 {
display: inline;
float: left;
position: relative;
margin-left: 15.0px;
margin-right: 15.0px;
}
header #logo {
display: inline-block;
float: left;
}
img {
vertical-align: middle;
display: block;
float: none;
margin: 0 auto;
}
img {
border: 0;
}
<body id="student_dashboard">
<form id="form1" runat="server">
<div id="custom_bg"><img src='<%= Page.ResolveClientUrl("~/secure-image/" + idBGImage) %>'></div>
<header>
<div class="container_12">
<div class="grid_12">
<div id="logo"><img src='<%= Page.ResolveClientUrl("~/secure-image/" + idLogo)%>' width="100" height="100"></div>
<h1 id="welcome">Welcome to <span id="spanName" runat="server"></span> Fundraising page</h1>
</div>
</div>
</header>
<div class="clearfix"></div>
<div id="content">
<div class="container_12">
<div class="wrapper">
<div class="grid_4">
<div><img src='<%= Page.ResolveClientUrl("~/secure-image/" + idImage)%>' class="rounded-image-corners" /></div>
<div class="name"><span id="spanNameMain" runat="server"></span></div>
<blockquote >Please help me reach my fundraising goal! Thank you so much!
</blockquote>
</div>
<div class="grid_8">
<div class="grid_8">
<div class="padding">
<p>Welcome to my fundraiser! Thank you for being willing to participate and help me and my team! You can see how my team is doing with our fundraising goal by checking the gauge at the bottom of this page. Remember, each dollar counts!</p>
</div>
</div>
<div class="grid_8">
<div class="padding">
<h3>Donate</h3>
<p>Make a direct donation to my fundraising account by clicking the "Donate" button below.</p>
<br><br>
</div>
<div id="thermo2" class="thermometer horizontal">
<div class="track">
<div class="goal">
<div class="amount"> 1000000 </div>
</div>
<div class="progressbar">
<div class="amount">354680 </div>
</div>
</div>
</div>
<div class="padding" id="paddingbtn">
<asp:ImageButton ID="btnImageDonate" runat="server" ImageURL="~/Images/btndonate.png" />
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="clearfix"></div>
</form>
</body>
This is an optimization issue. Use the picture tag in your html to solve it. Picture loads different size images depending on the screen size.
<picture>
<source srcset="img/hero_landscape.png" media="(max-width: 480px)" />
<img src="img/hero_pc.png" alt="Default Image" width="710" height="200">
</picture>
Info and examples on picture
I've been googling this and have found many answers, but none of them work in my situation because one of the divs is a gallery with multiple images. Basically, I'm trying to put an image and another gallery in the center of a page next to eachother.
HTML snippet:
<div class="sides">
<div class="featured-item">
<p class="featured-label">This weeks Featured Item is Mint Chip Cupcakes!</p> <img src="img/mintchip.jpg">
</div>
<div class="sides">
<div class="flexslider">
<ul class="slides">
<li>
<img src="img/1.jpg" alt="A Happy Birthday Mario Cake">
</li>
<li>
<img src="img/2.jpg" alt="A Pizza Hut Cake">
</li>
<li>
<img src="img/5.jpg" alt="A Makeup Cake">
</li>
<li>
<img src="img/6.jpg" alt="A Makeup Cake">
</li>
<li>
<img src="img/156.jpg" alt="A Makeup Cake">
</li>
</ul>
</div>
</div>
</div>
CSS:
.sides {
display: inline-block;
text-align: center;
max-width: 612px;
}
I also tried using each div seperately and using margin-left, margin-right but no luck. The max-width is 612px because that's the max-width of the gallery. I tried setting it to 1000 and it shows a ton of the images very widely.
Result: http://i.imgur.com/se8DwyL.png
One image is on top of the other, and they are on the left side of the screen.
First, you are using the "slides" class name for what seem like unrelated divs. I'd change that; it's only going to cause you grief. Next, the wrapper should have a set width and be centered with an auto margin -
.my-Wrapper-class {
width:960px;
margin:0px auto;
}
Now float the two divs holding your picture and slide show -
.featured-item {
float:left;
}
.flex-slider {
float:right;
}
You can add a margin to either of those until it's spaced to your liking.