473,624 Members | 2,439 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Why is it not possible to move images with my css code?

1 New Member
I wanted to have a navigation bar with images but it seems impossible to position the images in the navigation bar. Iused two images and even though I used the same code, the second one doesn´t move. I also tried changing the positions to absolute and relative, but nothing changed for the second image.

This is my code in css:
Expand|Select|Wrap|Line Numbers
  1. .topnav { 
  2.     background-color: #b3e0ff; 
  3.     color: #ffffff; 
  4.     height: 8%; 
  5.     padding-bottom: 20px; 
  6.     margin-top: 10px; 
  7.     margin-left: 150px;
  8.     margin-right: 150px; 
  9.     margin-bottom: 0px;
  10.     width: 1200px; 
  11.     position: sticky; 
  12.     top: 0; 
  13.  
  14. .topnav a { 
  15.     list-style: none; 
  16.     display: inline-block; 
  17.     float: left; 
  18.     text-decoration: none;
  19.     text-align: center; 
  20.     font-size: 25px; 
  21.     font-family: arial; 
  22.     color: #ffffff; 
  23.     padding: 25px 60px;
  24.     padding-bottom: 25px; 
  25.     word-spacing: 10px;
  26.  
  27. .GriechischeFlagge img { 
  28.     width: 40px;    
  29.     height: 35px; 
  30.  
  31. .GriechischeFlagge a { 
  32.     top: -55px; 
  33.     left: 15px;
  34.     display: inline-block; 
  35.     position: sticky;
  36.  
  37. .Warenkorb img { 
  38.     width: 65px; 
  39.     height: 65px; 
  40.  
  41. .Warenkorb a { 
  42.     top: -55px;
  43.     left: 35px; 
  44.     display: inline-block; 
  45.     position: sticky; 
  46. }
Dec 28 '20 #1
1 2513
dev7060
644 Recognized Expert Contributor
I believe because of positioning. Maybe provide the minimal code for the other party to be able to reproduce the same result.
Dec 29 '20 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

10
2037
by: Tobias Nilsson | last post by:
I have almost exactly the same problem as the guy below. Is it NOT possible running .NET code locally in Internet Explorer WITHOUT a webserver???? / Tobias --------- My company has in the past created local browser applications with front end in HTML/JavaScript and backend in the form of a Java applet. The applet code contained the business code and calculations. Benefit of this approach is
5
2173
by: Arno R | last post by:
Hi all, Is it possible to 'hide' code (e.g. in a mde) and to use this in app.mdb? Reason for asking: I have made some of the applications a client (health-care organisation) works with. My applications are usually mde's (Access '97 and up) or secured mdb's (Access 2.0) I want to secure the code and I also don't want clients to be able to 'mess up' applications I made. The organisation also uses 'own' mdb's. They work A LOT with...
8
1743
by: Amanda H. | last post by:
Hi guys, I just started switching my site over to tableless css, and I'm using a very lovely, transparent PNG-24 image. I have been trying to figure out if there is any way to replace an image before loading only for certain browsers using either javascript or PHP (I'm using PHP to switch stylesheets and prefer server-side). The problem is IE's handling of PNG-24 files: every other browser has alpha compatibility and displays PNG-24...
4
1145
by: Amanda H. | last post by:
Hi guys, I just started switching my site over to tableless css, and I'm using a very lovely, transparent PNG-24 image. I have been trying to figure out if there is any way to replace an image before loading only for certain browsers using either javascript or PHP (I'm using PHP to switch stylesheets and prefer server-side). The problem is IE's handling of PNG-24 files: every other browser has alpha compatibility and displays PNG-24...
1
1207
by: John Dalberg | last post by:
I have tens of aspx files which contain server side code. I need to move the code to code behind files. Is there a tool that can automate this? John Dalberg
1
1663
by: vvoltt | last post by:
Hi Guys. I have a MSSQL database of 2 gigs which has about 100mb of data, the rest is images. I have noticed a huge decrease in performance as more images are entered into the database (most images are about 1mb). I would like to know if there is a way to extract the images from the database and move them to a folder on the server. Does anyone have experience or suggestions as to how this can be done?
2
2320
by: PrakashN | last post by:
Is it possible to extract code from exe.. Yes means... Please give any tool..
5
9528
by: ravindarjobs | last post by:
i have few images say 10. i want to make a web page such that these images constantly move from left to right direction and if we click on a particular image then the corresponding jsp page must be loaded. how should i approach for this? give me an idea please....
2
1364
by: aayybb | last post by:
Can someone tell me what I did wrong in the following code? Thanks <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Arai</title>
3
2090
by: animation | last post by:
i have made a web site n i want to move images in the Y direction in the sidebar of the website. i want it to look like new image is coming out from the bottom and moving up to the height of the sidebar and at the other end it is disappearing .
0
8240
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8680
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8625
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8336
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7168
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6111
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4082
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2610
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1487
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.