When two unique Ids are merged to modify the same div button in distinct ways

Hey there, I'm having a little issue with getting the password_photo_galleries to appear in the right place on my website. The only solution I've found is to add an extra button to the navbar to access that information. Ideally, I want the MyGallery button on the navbar to show both photo_galleries and password_photo_galleries when clicked. However, I'm struggling to combine these two functionalities into one button. Any help would be greatly appreciated! One idea I had was to create a drop-down under the My Gallery button with options for My Gallery and Password Gallery, but since my navbar is at a -90deg angle, I'm not sure how that would work out. Just a thought though. Either way, any solution will work fine. Thanks again!

#profile_photo_galleries .heading {
  text-transform:uppercase;
  font-size:38px;
  color:#FF00FF;
  font-weight:normal;
  border-bottom:1px dotted #666666;
  padding-bottom:10px;
  margin-bottom:20px;
}

#profile_password_photo_galleries .heading {
  text-transform:uppercase;
  font-size:38px;
  color:#FF00FF;
  font-weight:normal;
  border-bottom:1px dotted #666666;
  padding-bottom:10px;
  margin-bottom:20px;
}

#profile_photo_galleries {
  width:400px;
  height:600px;
  color:#000000;
  font-family:"Baskerville Old Face",serif;
  font-style:italic;
  font-size:20px;
  background-color:rgba(0,0,255);
  position:absolute;
  top:200px;
  right:-1200px;
  padding:40px;
  transition:left 0 ease-in-out;
}

#profile_password_photo_galleries {
  width:400px;
  height:600px;
  color:#000000;
  font-family:"Baskerville Old Face",serif;
  font-style:italic;
  font-size:20px;
  background-color:rgba(0,0,255);
  position:absolute;
  top:200px;
  right:-1200px;
  padding:40px;
  transition:left 0 ease-in-out;
}

#profile_photo_galleries:target {
  right:80%;
  margin-right:-520px;
}

#profile_password_photo_galleries:target {
  right:80%;
  margin-right:-520px;
}

.photo_gallery {
  position:fixed;
  bottom:0;
  left:0;
  width:96.9%;
  margin-bottom:0;
  background-color:rgba(0,0,0,0.5);
  z-index:99;
}

.password_photo_galleries {
  position:fixed;
  bottom:0;
  left:0;
  width:96.9%;
  margin-bottom:0;
  background-color:rgba(0,0,0,0.5);
  z-index:99;
}

.photo_gallery .heading,.password_photo_galleries .heading {
  text-transform:uppercase;
  font-size:38px;
  font-weight:normal;
  border-bottom:1px dotted #666666;
  padding-bottom:10px;

... (Rest of the original code) ... 

HTML CODE FOR THE NAVBAR

<div id="right_menu">
    <a href="#profile_photo_galleries"><span>my gallery</span></a>
    <a href="#profile_password_photo_galleries"><span>Password</span</a>***this is the one i would like to open up with just the button my gallery or if you could make a drop down for a rotation -90deg span for my nav bar that would be awesome****
</div>

here is the navbar , no links

#right_menu {
  position:fixed;
  font-size:15px;
  top:0;
  right:0;
  background-color:#FF00FF;
  width:50px;
  height:100%;
}

#right_menu a {
  text-align:center;
  display:block;
  padding:10px;
  height:15%;
  width:50px;
  margin-bottom:0;
  text-transform:uppercase;
  position:relative;
}

#right_menu a:nth-child(1) {
  background-color:#FF00FF;
  color:#FFF;
}

#right_menu a:nth-child(1) span {
  display:block;
  position:absolute;
  top:40px;
  left:-40px;
  width:130px;
  color:#FFF;
  -webkit-transform:rotate(-90deg);
  -moz-transform:rotate(-90deg);
  -ms-transform:rotate(-90deg);
  transition:left .3s ease;
}

#right_menu a:nth-child(1):hover span {
  left:-45px;
}

Answer №1

Each DOM element is assigned a unique id, which can be represented like so:

<div id='uniqueId1'><span id='uniqueId2'></span></div>

By utilizing navigation methods, you can access the specific content you are seeking.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Generating dynamic HTML content in React using a variable within a string

Currently, I am utilizing TypeScript in a React application. I am receiving the following data from an API: a) a list of variable names ["name", "surname"] b) several strings in simple HTML form with variables "<p>Hello, ho ...

The detailView feature in wenzhixin bootstrap-table is failing to initialize the child row

I am currently utilizing the wenzhixin bootstrap table and attempting to initialize another bootstrap table within a child row known as 'detailView' in the code. Previously, I was using datatables but found this method to be simpler and more dir ...

Setting the z-index of inner links to be greater than the parent container's z-index

I'm curious if something like this could work: <div class="arrow-left" style="z-index:2; position: fixed; height: 100%; width: 100%;"></div> <div class="meta" style="z-index:1; position: relative;"> <div class="description"&g ...

Display a message in jQuery when the same option is chosen more than once

I need help with my form that has an input text field and a select dropdown. Here is the markup: <div id="form-wrap" style="width:500px; margin: 0 auto;"> <table> <tr> <th width="55%">Service Name</th> ...

The canvas could not be loaded properly in THREE.Texture()

I'm having trouble with adding an image onto the side of a cube that I'm creating. The image loads onto the canvas, but I'm struggling to incorporate it into the texture. function createPictureCanvas(text, font, foreground, background, xres ...

Step by step guide to creating individual counter sections

I have set up a counter section where the numbers go from 0 to a specific value. However, currently all three counters start counting simultaneously. Is there a way for the first counter to count up first, then once it's done, move on to the second c ...

What is the best way to navigate to the href link?

After attempting to use driver.find_element_by_id // link_text // partial link text without success, I'm wondering what method I should be using to access this href. Currently encountering a No Such Element Exception. Any assistance would be greatly a ...

Using JavaScript variables in CSS: a beginner's guide

My website features a typewriter effect, but I want the animation to match the length of the words exactly. I attempted using JavaScript variables in CSS, but unfortunately, it's not functioning properly. Could someone please advise me on how to remed ...

Instructions on creating an "already clicked" style for an <a> href

Is there a solution to display my href as already clicked? I'm looking for a property or method that does not involve css or javascript. ...

Updating the image source attribute using Vue.js with TypeScript

Let's discuss an issue with the img tag: <img @error="replaceByDefaultImage" :src="urls.photos_base_url_small.jpg'"/> The replaceByDefaultImage function is defined as follows: replaceByDefaultImage(e: HTMLImageElement) ...

Filtering posts in Angular with the use of pipes

I've been attempting to use pipes in Angular to filter posts from a table, but I keep running into this error on the console: core.js:12689 Can't bind to 'ngForFilter' since it isn't a known property of 'a'. I believe th ...

The breadth of the container

I am facing challenges in determining the setup of the content width with a fixed side panel. I want the side panel to maintain a set width regardless of the screen size, while the rest of the window accommodates the navbar, content, and footer. I have bee ...

Utilize styling only when both classes are actively used within media queries or bootstrap

Despite specifying to apply the text-align to 'md-3' instead of 'sm', it still applies when the browser is resized to use the 'sm' style. Simply put, I only want the style to be applied if the media queries interpret my devic ...

Updating HTML using Angular JS with a nested dictionary is a breeze

As a newcomer to AngularJS, I am facing an issue with my code. I have created a dictionary in the controller scope and populated it after an HTTP request (key, value pair). The dictionary is being created successfully and there are no errors, but the HTML ...

At times, the animation in SetInterval may experience interruptions

I have created an animation using a sequence of images. The animation runs smoothly with the setinterval function, but for some reason, it occasionally pauses. I've shared a fiddle where you can see this pause happening. Click Here to See the Unwante ...

How can I apply a shadow effect to a <View> element just like a regular tab bar?

My customized navigation bar is using the <View> element. https://i.sstatic.net/QA8Ad.png Is it possible to add a bottom shadow similar to the default react-navigation bar (refer to the image below)? https://i.sstatic.net/ORD8J.png I find it chal ...

How to design a stylish footer using CSS and HTML

I need assistance in creating a footer for my website, which can be visited at mavenpvp.cu.cc. Can someone guide me on how to achieve this look? I want the footer design to resemble that of mineplex.com Kindly note that I am a beginner in CSS and HTML. B ...

Customizing CSS based on URL or parent-child relationship in WordPress

I'm having trouble finding a solution for what seems like a simple issue... Currently, my header has a border-bottom and I'd like to change the color of this border based on the section the user is in. For example, consider these parent pages: ...

Can Spring Boot be set up to return JSON instead of HTML for InvalidTokenException when configuring OAuth2?

When testing my Spring Boot application, I realized that querying one of my REST endpoints with an invalid token using Postman resulted in a response content in HTML format instead of JSON. The endpoint correctly responded with 401 InvalidTokenException, b ...

ways to conceal list elements using an HTML search box

Is there a way to hide list items from the filter in an HTML search box? For example, I only want the items to show when I click on the search box and then display the item list. Otherwise, I would like the list items to be hidden under normal conditions ...