CSS - background image for UI Kit - html

I've tried to modify background image of a div ...
<div class="uk-grid" data-uk-grid-margin>
<div class="uk-width-medium-1-1">
<div class="uk-vertical-align uk-text-center" style="background: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxNi4wLjQsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DQo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkViZW5lXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB3aWR0aD0iMTEzMHB4IiBoZWlnaHQ9IjQ1MHB4IiB2aWV3Qm94PSIwIDAgMTEzMCA0NTAiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDExMzAgNDUwIiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxyZWN0IGZpbGw9IiNGNUY1RjUiIHdpZHRoPSIxMTMwIiBoZWlnaHQ9IjQ1MCIvPg0KPC9zdmc+DQo=') 50% 0 no-repeat; height: 450px;">
<div class="uk-vertical-align-middle uk-width-1-2">
<h1 class="uk-heading-large">Games are life, games are love.</h1>
<p class="uk-text-large">If you are a trully gamer and a lover of fps/moba/rpg you are in the right place. We are a big community of gaming, we sell games and help you to get the latest ones you would like to have.</p>
<p>
<a class="uk-button uk-button-primary uk-button-large" href="#">Button</a>
<a class="uk-button uk-button-large" href="#">Button</a>
</p>
</div>
</div>
</div>
</div>
This <div class="uk-vertical-align uk-text-center" it's the div i need to modify.
If i replace background: url with background-image: url() it doesn't work, i have the image i want in folder images where website is placed.
Any idea what could I do ? i searched this problem .. i tried a lil bit with CSS in uikit.css, nothing works.
Thank you in advance for your time and help.

Nothing is wrong, it's work just see this snippet with black body.
Your data image it's just a color, no content.
If you want to call image in a folder try to make
background: url('./folder/path_to_your_img')
body{
background-color: #000;
}
<div class="uk-grid" data-uk-grid-margin>
<div class="uk-width-medium-1-1">
<div class="uk-vertical-align uk-text-center" style="background: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxNi4wLjQsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DQo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkViZW5lXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB3aWR0aD0iMTEzMHB4IiBoZWlnaHQ9IjQ1MHB4IiB2aWV3Qm94PSIwIDAgMTEzMCA0NTAiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDExMzAgNDUwIiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxyZWN0IGZpbGw9IiNGNUY1RjUiIHdpZHRoPSIxMTMwIiBoZWlnaHQ9IjQ1MCIvPg0KPC9zdmc+DQo=') 50% 0 no-repeat; height: 450px;">
<div class="uk-vertical-align-middle uk-width-1-2">
<h1 class="uk-heading-large">Games are life, games are love.</h1>
<p class="uk-text-large">If you are a trully gamer and a lover of fps/moba/rpg you are in the right place. We are a big community of gaming, we sell games and help you to get the latest ones you would like to have.</p>
<p>
<a class="uk-button uk-button-primary uk-button-large" href="#">Button</a>
<a class="uk-button uk-button-large" href="#">Button</a>
</p>
</div>
</div>
</div>
</div>

Try This this will help you.
.uk-vertical-align{
background-image:url("https://zellox.com/wp-content/uploads/2016/02/background-image-in-html.jpg");
height: 450px;
}
<div class="uk-grid" data-uk-grid-margin>
<div class="uk-width-medium-1-1">
<div class="uk-vertical-align uk-text-center">
<div class="uk-vertical-align-middle uk-width-1-2">
<h1 class="uk-heading-large">Games are life, games are love.</h1>
<p class="uk-text-large">If you are a trully gamer and a lover of fps/moba/rpg you are in the right place. We are a big community of gaming, we sell games and help you to get the latest ones you would like to have.</p>
<p>
<a class="uk-button uk-button-primary uk-button-large" href="#">Button</a>
<a class="uk-button uk-button-large" href="#">Button</a>
</p>
</div>
</div>
</div>
</div>
write Your image path instead of (https://zellox.com/wp-content/uploads/2016/02/background-image-in-html.jpg)

Related

How do I add social media icons side by side in my footer?

I need to add Instagram and LinkedIn icons next to the facebook icon side by side in the footer and for it to be responsive. I have a page builder but this is code, which I am learning but not too familiar with. Attached is a screenshot of the current module and below is the code.
Code:
[vc_row row_type="row" use_row_as_full_screen_section="no" type="grid" text_align="left" css_animation=""]
[vc_column width="1/2"]<p class="footer-title">Our Services</p>
<p class="footer-text">Building Inspections<br>
Meth Testing<br>
Asbestos Surveying & Testing<br>
Terms of Trade
[/vc_column]
[vc_column width="1/2"]<p class="footer-title">Connect with us</p>
<p class="mobile-hide footer-text"><a class="wplightbox" href="#newsletter" data-width="400" data-height="450">Newsletter Signup</a>
<div id="newsletter" style="display: none;">
<div class="lightboxcontainer">
<div class="download_block">
<div class="form-wrapper">
[gravityform id="9" title="false" description="true" ajax="true"]
</div>
</div>
</div>
</div>
<br>
<i class="fa fa-facebook-official social-icons" aria-hidden="true"></i></p>
[/vc_column]
[/vc_row]
I have tried to make some update but they haven't worked

How do I stop the slider content from hiding?

I am currently trying to figure out how to stop slider section content from disappearing. I tried to remove the "data-hide-transition" & "data-hide-delay" from the code, but still no luck.
Below I have included code for the slider section. I would really appreciate, if some could let me know what the problem & solution could be.
<section class="section-header-slider">
<div class="slider-pro-init vertical-slider" data-orientation="vertical" data-buttons-control="true" data-arrows-control="false">
<div class="sp-slides">
<div class="slide-item dark sp-slide">
<div class="slide-image">
<img src="img/sections/section-11.jpg" alt="" />
</div>
<div class="slide-content right-slide-content dark-content">
<div class="above-title sp-layer" data-show-transition="left" data-hide-transition="" data-show-delay="400" data-hide-delay="" >we are CreativeBrick.</div>
<h1 class="sp-layer" data-show-transition="right" data-show-delay="500" >Real Estate Marketing</h1>
<p class="sp-layer" data-show-transition="up" data-hide-transition="up" data-show-delay="600" data-hide-delay="5100">With over a decade of experience, we have helped our clients all over the world <br />
to create eye-catching and beautiful solutions for their business.</p>
<div class="slider-buttons sp-layer" data-show-transition="up" data-hide-transition="up" data-show-delay="800" data-hide-delay="5100">
get started
purchase
</div>
</div>
</div>
</div>
</div>
</section>

No background in IE and Firefox

I've recently designed a website and have realised that some of the background of the content, when you scroll down is transparent and so the fixed div that is beneath the content displays on IE and Firefox. Please see my website for a live view of the problem. The HTML is below. Please see below an image of my problem as you can see the text "Get In Touch" is being displayed. I want the background of the content to be above this. Please find attached the fiddle.
<body>
<div class="overlay overlay-hugeinc">
<button type=button class=overlay-close></button>
<img src=http://kadeem.london/Image/Transparent-Kadeem-min.png class="fixed-Me scaling">
<nav>
<ul>
<li><a href=http://kadeem.london>Home</a></li>
<li><a href=papers.html>Papers</a></li>
<li><a href=events.html>Events</a></li>
<li><a href=designs.html>Designs</a></li>
</ul>
</nav>
</div>
<div id=trigger-overlay>
<div class=menubutton>
<h3 class=menubuttontext>MENU</h3></div></div>
<div class=high-container>
<div class=global-container>
<div class=Intro-Video>
<div class=video-box>
<div id=video-container>
<video autoplay class=fillWidth>
<source src=Video/Trailer.mp4 type="video/mp4"/>
</video>
<div class=Kadeem-Logo>
<img src=http://kadeem.london/Image/KL-LOGO.png>
</div>
</div>
</div>
</div>
<div class=content-container>
<div class=row>
<div class="border red"></div>
<h1 class=title-role>
I'm Kadeem
</h1>
</div>
<div class=post-container>
<div class=Biographical-Content>
<div class="step out-view"></div>
<br>
<p>I go by the name of <a href=https://www.linkedin.com/pub/kadeem-laurie/57/277/9b5>Kadeem Laurie</a>. I am an events graduate currently developing an events marketing start-up. This website was created from scratch using HTML5, CSS3,jQuery & responsive design. I specialise in event management, digital content, SEO, marketing strategy, branding and front-end web design. <p> Freedom of thought inspires me. I love conceptualising and seeing ideas evolve. I see myself as a marketeer who simply likes to make things look good, branding has thus always been my most favourable aspect of marketing. I studied event management in university and have organised a <a href=events.html> few events</a> of my own. I am currently working as an event organiser at <a href=https://en.wikipedia.org/wiki/Spire_Healthcare>Spire Healthcare</a>. I hope to integrate events within marketing strategy more. I like to ask the <a href=http://stackoverflow.com/users/1923610/kadeem-laurie target=_blank>right questions</a> and find solutions from different perspectives. My academic interests lie in the regions of city branding and <a href=https://www.academia.edu/14690454/The_Commercial_and_Political_Implications_of_Events>events management.</a> <p>My favourite book is <a href=https://en.wikipedia.org/wiki/The_Prince>The Prince</a> by Nicolo Machievelli. My favourite dish is <a href=http://lifestyle.sapo.pt/sabores/receitas/arroz-de-marisco>Arroz De Marisco.</a> This website has been recently created so content is being added concurrently.
<p>
</p>
</div>
</div>
</div>
<div class=other-contain>
<div class=My-Gems>
<div id=effect-6 class="effects clearfix">
<div class=img>
<img src=https://alchetron.com/cdn/zeebra-5e766eb1-964a-49c5-b888-c05effa9354-resize-750.jpeg style=height:100% alt>
<div class=overlay5>
<a class=expand>Bone & Joint Launch</a>
</div>
</div>
<div class=img>
<img src=http://kadeem.london/Image/Money-Matters-Logo.png alt>
<div class=overlay5>
<a href=designs.html class=expand>Money Matters</a>
</div>
</div></div>
</div>
</div>
<div class=eee>
<div class=row>
<section id=activities class=pane>
<div class=pane-content>
<div class=pane-row>
<div class=summary>
<p>POSTS</p>
</div>
</div>
<div class="pane-row d">
<div class=activity-col>
<h4>city branding</h4>
<ul>
<li><a>The Impact of City Branding in The Perceived Image of Cities: The Case of New York City</a></li>
</ul>
<h4>Urban Regeneration</h4>
<ul>
<li>The Role of Events in Urban Regeneration</li>
<li>Hacknified</li>
</ul>
</div>
<div class=activity-col>
<h4>Marketing Strategy</h4>
<ul>
<li>Marketing Strategy: British Airways vs. Air France</li>
<li>The Marketing Strategies of Startup Brands</li>
</ul>
<h4>Events Management</h4>
<ul>
<li>The Political & Commerical Implications of Events</li>
</ul>
</div>
<div class=activity-col>
<h4>Events Marketing</h4>
<ul>
<li>Marketing Events Online</li>
<li>The Role of City Branding in Urban Tourism</li>
</ul>
<h4>Digital Marketing</h4>
<ul>
<li>Digital Content</li>
<li>Post Purchase Behaviour of Hotel Guests</li>
</ul>
</div>
</div>
</div>
</section>
<footer class=goodbye>
<div class="border red4"></div>
<div class=block>
<div class=centered>
<h2 class=text-go>GET IN TOUCH</h2>
</div>
</div>
</footer>
<footer class=goodbye4>
<div class=block6>
<div class=centered6>
If you would like to find out more about me you can <a href=mailto:kadeemlaurie#gmail.com>message me</a>.
</div>
</div>
</footer>
<footer class=goodbye5>
<div class=container1>
<footer class=footer>
<div class=container1>
<div class=flex-item>© 2015 KADEEM</div>
</div>
</footer>
</div>
</div>
You have an empty P tag inside your post-container that is causing this gap. Remove it and it will fix everything accross all browsers. Also, once the empty tag is removed, you could give the last P element (with the "My favourite book" text) a padding-bottom of 45px to push the container down correctly.
<div class="post-container">
<div class="Biographical-Content hidden visible animated fadeInUpBig">
<div style="height: 407px;" class="step out-view active"></div>
<br>
<p>I go by the name of [...]</p>
<p> Freedom of thought [...]</p>
<p>My favourite book [...]</p>
<p></p> --> Empty P tag
</div>
</div>
If for any reason you can't avoid having that "extra" <p> in your html; add this to your css
p:last-child {
display: none;
}

How to align image and download button in css?

Here is my jsfiddle: http://jsfiddle.net/4478bs0L/
I need to place download button underneath of image at left side.
For that, here is my html:
<div><img src="9780143332497.jpg" alt="">
<a href="9780143332497.jpg" class="myButton" download="ss" title="Download">
<img src="/path/to/image" alt="Download">
</a></div>
If i add caption class to the button and set text-align:center; it didn't working.
Can anyone please help me? Thanks in advance.
Option1: Add a <br/> between both images.[Apparently, your button is also an image]. Sometimes the simplest answer is the easiest.
<img src="image1" alt="">
<br/>
<a href="image2" class="myButton" download="ss" title="Download">
<img src="/path/to/image" alt="Download">
</a>
Option 2: enclose your button inside a <div> [ block element]
<div>
<a href="http://s30.postimg.org/b7rdjjkwh/9780143332497.jpg" class="myButton" download="ss" title="Download">
<img src="/path/to/image" style="display:block"alt="Download"/>
</a>
</div>
Option 3: add inline css property display:block to the anchor tag containing your button[inline css would override the myButton class property which is making it appear on the same line]
<a href="http://s30.postimg.org/b7rdjjkwh/9780143332497.jpg" class="myButton" style="display:block;width:60px" download="ss" title="Download">
<img src="/path/to/image" alt="Download">
</a>
Cheers!!
just use a <br> after the image and before the button
<div><img src="9780143332497.jpg" alt="">
<br>
<a href="9780143332497.jpg" class="myButton" download="ss" title="Download">
<img src="/path/to/image" alt="Download">
</a></div>
FIDDLE DEMO
Yes I did it .... implement this code...
<div class="wrap">
<div class="london-olympic">
<h1>Playng To Win</h1>
<span class="span">Author: Saina Nehwal.</span>
<!-- Go to www.addthis.com/dashboard to customize your tools -->
<div class="addthis_jumbo_share"></div>
<div><img src="http://s30.postimg.org/b7rdjjkwh/9780143332497.jpg" alt="">
<a style="position:absolute; margin-left: -140px; top: 450px;" href="http://s30.postimg.org/b7rdjjkwh/9780143332497.jpg" class="myButton" download="ss" title="Download">
<img src="/path/to/image" alt="Download">
</a>
</div>
<Br><br>
<p>. . . being a player from India defines who I am. When I play, it's for my parents, my coach, and my country.'</p>
<p>Meet Saina Nehwal-India's star badminton player and World Number 4, Padma Shri and Khel Ratna awardee, the girl who brought laurels to India by winning an Olympic medal at the age of twenty-two. In this fascinating memoir, she talks about her childhood and growing-up years; her relationship with the most important people in her life; the ups and downs of her celebrated career, from district level wins to the Olympics; and the sacrifices needed to succeed in any sport. She also reveals little-known facts and offers a peek into her many avatars-daughter, sister, student, and the regular girl behind the badminton prodigy.</p>
<p>Find out what a typical day in Saina's life is like-rigorous training, a strict diet, and no parties or sleepovers. But it's not all work and no play; Saina loves to shop, eat ice cream (post wins only), and play games on her iPad!</p>
<p>With candid photographs and badminton tips from the pro herself, this book showcases the making of a badminton champ-in her own words.</p>
</div>
</div>
Use this code
<div>
<img src="9780143332497.jpg" alt="">
</div>
<div>
<a href="9780143332497.jpg" class="myButton" download="ss" title="Download">
<img src="/path/to/image" alt="Download">
</a>
</div>

Adding next paragraph/picture in the same line (empty space) not from the new line

I am trying to make a page by only using html , as i am new to html what i tried is
<div id="container" style="width:400px">
<div id="header" style="background-color:#0000;">
<h1 style="margin-bottom:0;">Box Office</h1>
</div>
<div id="content" style="background-color:#EEEEEE;height:200px;width:400px;float:left;">
<p>
<a href="http://www.imdb.com/title/tt1170358/?ref_=hm_cht_t1" target="_blank" >1. The Hobbit: The Desolation of Smaug $31.5M </a>
</p>
<p>
<a href="http://www.imdb.com/title/tt1229340/?ref_=hm_cht_t2" target="_blank" >2. Anchorman 2: The Legend Continues $26.8M </a>
</p>
<p>
<a href="http://www.imdb.com/title/tt2294629/?ref_=hm_cht_t3" target="_blank" >3. Frozen $19.6M </a>
</p>
<p>
<a href="http://www.imdb.com/title/tt1800241/?ref_=hm_cht_t4" target="_blank" >4. American Hustle $19.1M </a>
</p>
<p>
<a href="http://www.imdb.com/title/tt2140373/?ref_=hm_cht_t5" target="_blank" >5. Saving Mr. Banks $9.34M </a>
</p>
</div>
Which make something like this
Now i want to start my next phase in the same flow but i want to start from the empty space after this block like in tha landscape flow , What i need to do so that my next part will start after it , i don't want to use the new line for next thing i want to enter
Reuired output
Now i want that when i start my new block it should start from after the first block like it shuld start from where i write "Now i want this"
Does this solve your problem?
Are you trying to float the 2 container divs side-by-side in landscape?
<div id="container" style="width:400px">
<div id="header" style="background-color:#0000;">
<h1 style="margin-bottom:0;">Box Office</h1>
</div>
<div id="content" style="background-color:#EEEEEE;height:200px;width:600px;float:left;">
<div style='width: 50%;display:inline-block;float:left;'>
<p> 1. The Hobbit: The Desolation of Smaug $31.5M
</p>
<p> 2. Anchorman 2: The Legend Continues $26.8M
</p>
<p> 3. Frozen $19.6M
</p>
<p> 4. American Hustle $19.1M
</p>
<p> 5. Saving Mr. Banks $9.34M
</p>
</div>
<div style='width: 50%;
display:inline-block;
float:left;background:#ddd;height:100%; '>
<h2>Now I want this</h2>
</div>
</div>