CUTCODEDOWN
Minimalist Semantic Markup

Welcome Guest
Please Login or Register

If you have registered but not recieved your activation e-mail in a reasonable amount of time, or have issues with using the registration form, please use our Contact Form for assistance. Include both your username and the e-mail you tried to register with.

Author Topic: Positioning elements  (Read 141 times)

AndrewTraub

  • Jr. Member
  • **
  • Posts: 76
  • Karma: +0/-0
Positioning elements
« on: 24 Jan 2023, 05:41:16 pm »
I'm having trouble positioning the javascript added slider buttons on my home page at https://AustinAccidentLawyer.com.

The CSS is primarily this:

Code: [Select]
.carousel-container .carousel-actions {
    display: flex;
    width: 100%;
    justify-content: space-between; /* put space between the navigation buttons */
    /*position: absolute; /* position navigation buttons on top */
    /*top: 50%; /* center navigation buttons on the slide */
    transform: translateY(-600%); /* align navigation buttons */
}

If I position it absolute with top at 50% and transform: translateY(-50%) I thought it would center it, but it makes the containing div too large and also puts the buttons who knows where. My hack has been to disable the absolute and top positioning and ramp up the negative Y translation.

Any help would be appreciated.

mtness

  • Junior Member
  • *
  • Posts: 6
  • Karma: +0/-0
Re: Positioning elements
« Reply #1 on: 25 Jan 2023, 06:20:51 am »
Hi there,
IMHO, neglect the
Code: [Select]
transform and just leave the directional buttons at the bottom,
It really doe not make a great difference visually. Depends on what you want to achieve with your site.


Those that know they know. Those that don’t probably never will^^

Jason Knight

  • Administrator
  • Hero Member
  • *****
  • Posts: 919
  • Karma: +171/-1
    • CutCodeDown -- Minimalist Semantic Markup
Re: Positioning elements
« Reply #2 on: 25 Jan 2023, 11:22:17 am »
I'm not even sure what you mean by "slider buttons" or what that code you presented has to do with said page.

Do you mean the testimonials area so far down the page NOBODY is going to read that far?

Laugh is, I think scrollbars can now function that way without the need for scripting or excess radio buttons. I'd have to play with it though.
« Last Edit: 25 Jan 2023, 11:24:46 am by Jason Knight »
I'll fix every flaw, I'll break every law, I'll tear up the rulebook if that's what it takes. You will see, I will crush this cold machine.

 

SMF spam blocked by CleanTalk

Advertisement