Skip to content

Why not wrap everything in a container for responsive? #102

@Jakobud

Description

@Jakobud

Instead of creating your span next to the select like this:

<select class='hasCustomSelect'..../>
<span class='customSelect'>...</span>

Why don't you wrap everything into a containing element

<span class='customSelectContainer'>
  <select class='hasCustomSelect'..../>
  <span class='customSelect'>...</span>
</span>

And then make the .customSelect and select width: 100%? That way the user can easily just make the container responsive in whatever way they want and both the select and the customSelect will stay exactly the same size as the container using simple css?

Honestly its kind of weird you put it parallel to the select in the DOM and then you try to manage the width of each element by itself using javascript...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions