CSS Background Image linked right; doesnt show in Browser

UchiCode

I want to place an image above my nav bar and then a background image behind the nav bar as well.

My current html for the image above nav bar:

<div class="viewport-1"></div>

My current CSS for the image above nav bar:

.viewport-1
{
background-size: cover;
background-image: url('saultitle.png');
height: 100vh;
}

The image is linked in the CSS sheet as it show whenever I hover over the link in Brackets and there is a gap in the webpage where the image should be - however it does not show.

As for the nav bar image there is no gap as it is a background image but it is also linked in the CSS sheet.

Nav bar HTML

<div id="nav">

<table class="nav">

<tr>

<td><a href="#getting-his-start">Getting his Start</a></td>
<td><a href="#cinematic-revolution">Cinematic Revolution</a></td>
<td><a href="#experimental-phase">The Experimental Phase</a></td>
<td><a href="#logos-made-to-last">Logos Made to Last</a></td>
<td><a href="#the-nect-big-thing">The Next Big Thing</a></td>
<td><a href="#his-influence-today">His Influence Today</a></td>

</tr>

</table>
            </div>

Nav bar CSS

.nav { 
background-image: url('goldenarm.png');
width:100%;
padding:1em 0;

Any advice as to why they don't show?

lalit bhakuni

you can use:

#nav {
    position: relative;
    overflow: hidden;
}

.viewport-1 {
    background-size: cover;
    background-image: url('saultitle.png');
    height: 100%;
    background-color: #333;
    width: 100%;
    top: 0;
    position: absolute;
    transition: all ease-in-out 0.5s;
}

https://jsfiddle.net/nnwn7jbg/1

#nav:hover .viewport-1 {transform: translate(00%,-100%);;} 

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

CSS - Responsive - Crop left and right part of a background image as you adjust the width of the browser

From Dev

CSS set image background color, not show image

From Java

Offset a background image from the right using CSS

From Dev

css issue with background image on mobile browser

From Dev

Html and CSS linked in text editor but does not show in web browser

From Dev

Html and CSS linked in text editor but does not show in web browser

From Dev

Html and CSS linked in text editor but does not show in web browser

From Dev

Background css image won't show in firefox

From Dev

ubuntu doesnt show image in html

From Dev

Image doesnt show up in php

From Dev

HTML/CSS Progess Bar shows on browser but doesnt show when trying to print the document

From Dev

CSS doesnt show part of code

From Dev

CSS doesnt show part of code

From Dev

Changing background image of selected CSS Tab linked to radio

From Dev

How to show a background image over foreground image using CSS

From Dev

CSS file is linked but doesnt affect the page

From Dev

CSS file is linked but doesnt affect the page

From Dev

My image doesnt scale to its right pixel

From Dev

css dock table background image to the right without stretching horizontally

From Dev

Background Image Pushed to the Right

From Dev

CSS - How to resize texboxes with background image when browser is resized?

From Dev

Stretch image (not background) to full browser width in Wordpress with HTML and CSS

From Dev

PHP Show image on the browser

From Dev

Image cropping method doesnt show "submit"

From Dev

background-size is not working on FF; doesn't show the CSS image?

From Dev

background-image css does not show in img tag

From Dev

CSS Footer background image won't show up

From Dev

Background image doesn't show within the <div> element - CSS/HTML

From Dev

Rails background image not show?

Related Related

  1. 1

    CSS - Responsive - Crop left and right part of a background image as you adjust the width of the browser

  2. 2

    CSS set image background color, not show image

  3. 3

    Offset a background image from the right using CSS

  4. 4

    css issue with background image on mobile browser

  5. 5

    Html and CSS linked in text editor but does not show in web browser

  6. 6

    Html and CSS linked in text editor but does not show in web browser

  7. 7

    Html and CSS linked in text editor but does not show in web browser

  8. 8

    Background css image won't show in firefox

  9. 9

    ubuntu doesnt show image in html

  10. 10

    Image doesnt show up in php

  11. 11

    HTML/CSS Progess Bar shows on browser but doesnt show when trying to print the document

  12. 12

    CSS doesnt show part of code

  13. 13

    CSS doesnt show part of code

  14. 14

    Changing background image of selected CSS Tab linked to radio

  15. 15

    How to show a background image over foreground image using CSS

  16. 16

    CSS file is linked but doesnt affect the page

  17. 17

    CSS file is linked but doesnt affect the page

  18. 18

    My image doesnt scale to its right pixel

  19. 19

    css dock table background image to the right without stretching horizontally

  20. 20

    Background Image Pushed to the Right

  21. 21

    CSS - How to resize texboxes with background image when browser is resized?

  22. 22

    Stretch image (not background) to full browser width in Wordpress with HTML and CSS

  23. 23

    PHP Show image on the browser

  24. 24

    Image cropping method doesnt show "submit"

  25. 25

    background-size is not working on FF; doesn't show the CSS image?

  26. 26

    background-image css does not show in img tag

  27. 27

    CSS Footer background image won't show up

  28. 28

    Background image doesn't show within the <div> element - CSS/HTML

  29. 29

    Rails background image not show?

HotTag

Archive