Most voted "div" questions
The HTML div element is semantically neutral, and often used for grouping content for styling, and for content that cannot be described semantically by any other element.
Learn more…298 questions
Sort by count of
-
1
votes1
answer1310
viewsHow to prevent a div from leaving the page, when another div changes size?
My page has basically two divs, to the right and to the left, the two are with style="position: fixed;", that is, if I roll the page, those two divs are side by side, fixed, always visible. But when…
-
1
votes0
answers146
viewsHow to create a type of "DIV" in Xamarin Forms
How do I create a component that looks like a div in Xamarin Forms ? I need to create something inside that will have some labels with information referring to the user’s address, and will be…
-
1
votes2
answers946
viewsProblems validating quiz response with javascript
I’m trying to create a simple quiz but I don’t have much programming. The intention is that when the user marks a reply and clicks on the button, a div showing whether it’s right or wrong.…
-
1
votes4
answers657
viewsHow to organize many Ivs in Bootstrap (Image)
How do I organize many Divs col-xx-3 different heights? Is there any class or other method without using Row (every 4 products)? Some way no need to change Select or PHP? I tried several ways but I…
-
1
votes1
answer2709
viewsHow to maintain the aspect ratio of an image within a fixed size CSS div?
I’m having a hard time creating an image that stays inside a div, maintaining its proportions. But the div has a standard size and cannot exceed this limit size. Below I leave an image that…
-
1
votes1
answer91
viewsProblem in CSS formatting
Noble friends, I am working on an ebook in the Sigil program. By linking the css stylesheet to xhtml I can format the H1, H2 and H3 tags. However, in the same file, I cannot format p and div tags. I…
-
1
votes1
answer178
viewsDemystifying the Veritcal-align... on which display does it work?
No, the question is not repeated... In other questions, I saw gambiarras to align the text vertically using margin, padding, etc. And saw as a possible solution, change to display:flex,…
-
1
votes1
answer252
viewsDrag div to another div and resize on drop!
Good night, you guys! Basically what I’m trying to do is drag a div (#mainmsg) into another div (#msgprivhere), but I need it resized when I drop it. I would just like to know if this is possible. I…
-
1
votes1
answer261
viewsMake a DIV appear only at a certain time
For example, I have a certain div, but I want her to show up only from 6:00 to 00:00 every day, but I have no idea how to do that. <div class="conteudo"> <h1>aqui vai o conteudo da…
-
1
votes0
answers34
viewsCalculate distance between 2 points in Google maps1
Hello a colleague solved this problem of calculating a distance on google maps, my question is. How to multiply the amount of km of the search path? , that is to multiply the km and print together…
-
1
votes1
answer1783
viewsCan I disable a div using css?
So I created two div inside each other and my idea was this: I wanted to leave a div inactive, and when I leave the mouse on one, the other appears. The command I used for this is opacity: 0; to…
-
1
votes1
answer100
viewsDIV resize after being clicked
hello I have a page with several DIV. that are different News. these divs are at a size of 300px by 250px, would like to know how do i click on any of these div she redeem on screen and get bigger…
-
1
votes3
answers1175
viewsBackground image problem in div
I have a problem in a div. Her name is <div id="content-homepage"> It turns out that this div has some contents inside (texts, titles and a button), and when I insert the image through the…
-
1
votes2
answers73
viewsHow to recover the class of a div by clicking on it?
Several gero divs over time with a code Javascript, would like to retrieve the class of those Ivs by clicking on them. Or retrieve some other parameter to use in a comparison.…
-
1
votes1
answer64
viewsDIV clone from one page to another
Hello I’m having trouble copying the side menu of the home page to the category page, I usually use the command below to copy div to the same page, but for different pages I’m not getting <script…
-
1
votes1
answer148
viewsHow to duplicate visualization of HTML elements
I have 5 images, and 3 of them have the same class being exhibited on div To. <div id='A'> <img src="https://sites.google.com/site/mplayerplugin/thumbnails/09.jpg" class="figura" />…
-
1
votes2
answers151
viewsRemove div if input is empty
I’d like to rule that out div if the input receive an empty value. <div class="form-group col-md-2 usuario"> <label>Usuário:</label> <input type="text" readonly…
-
1
votes1
answer64
viewsHeader fixed over subtitle by clicking on a content index anchor
I have a fixed header at the top of the page, which calls a index, this index allows you to navigate the text using anchor, the point is that when I click on an item of the index, navigate to the…
-
1
votes1
answer52
viewsAppear div according to condition
Good afternoon At the end of an order I want to appear a div depending on the payment method, maybe identify by the name of the payment method. The div in question is this <div> <h2>…
-
1
votes1
answer531
viewsDiv showing content by clicking button
with this doubt I have already researched several codes here but none worked, I have a button in the center of the screen and when clicking I want to show a specific test that is in a div, but what…
-
1
votes2
answers710
viewsHow do you line up a div inside another div and put 100% size buttons at the end of the div?
Hello. I am making a login screen and would like to center the forms and put the buttons login and forgot the password at the end of that white rectangle, like the title of the rectangle. I’m using…
-
1
votes1
answer773
viewsPlace div daughter element ul li occupying 100% of page width
The problem is this: I have a div who is daughter of a li element of a ul that does not start in the corner of the page. There are two subproblems: 1 - I need to be able to expand this div so that…
-
1
votes1
answer1284
viewsScroll bar only in a div
I’m trying to create a table with only two lines. My intention is that the table is responsive and that the scroll bar appears only in the second row if the content exceeds the height. In the Chrome…
-
1
votes1
answer1072
viewsHow to take the Text of a Div Class and Put it inside a Label?
I’m trying to take the "value" inside the div to put inside a label. Div: <div class="info">valor</div> First Attempt Variavel1 =…
-
1
votes1
answer164
viewsOverlapping divs
I have a search input, which adds the mechanistic tbm, but the result is getting overlapped <div class="col-lg-4"> <label for="mecanico">Mecânico</label> <div…
-
1
votes1
answer5091
viewsHow to keep div size independent of text size?
I own a div which represents a square in which it aims to display a text to the user, see: html, body { background-color: #323232; } html { font-family: 'helvetica neue', 'arial', sans-serif;…
-
1
votes1
answer1401
viewsHow to create a mouse-over effect on an image and position it where I want?
I’m looking to replicate an effect of mouse over but what I’ve achieved so far is a bit buggy, the line with the effect is going from one side to the other, and it’s not just the length of the text,…
-
1
votes1
answer52
viewsEvent in a single div with equal classes. How to do?
Greetings. I created some div inside a foreach, all with the same class, inside that div has an element that I wish, when clicked, show another div that is inside the parent div created. However, as…
-
1
votes1
answer92
viewsHow do these Divs have the same height, but with their content they can be different?
How to make the Divs below have the same height every time? The content is dynamic, time content of the first will be higher, time of the second, I could use Tables, but the content is not tabular.…
-
1
votes1
answer115
viewsAlignment of div’s on the right
I am unable to align the div’s right into my mpdf report. Below contains the report print and code. Below the code: </head> <style type='text/css'> .dados_principais { border: 1px solid…
-
1
votes1
answer361
viewsResize img inside a div
Hello, I have a website that has posts... and in some posts I put pictures on them, but these images are not responsive! and there’s no way to change her class to a responsive class... because these…
-
1
votes2
answers284
viewsAutofocus and Required in javascript hidden fields
I have a field to select two other fields. When shows the situation field hides the other div and vice versa, this is working perfectly. I wonder how I can do to give a required autofocus when the…
-
1
votes3
answers840
viewsDIV Bootstrap Alignment
I used the code @hugocsl gave me and it was aligned, but now it’s tiny in responsive. I used min-width and it worked! .img map { float: left; border:1px Solid; } map {. display: flex;…
-
1
votes1
answer79
viewsProblem showing/hiding Ivs when uploading site
Hi, I’m using Jquery to show/hide Ivs. When I open the local page Ivs work normally (open and hide), but when you move the page up to the web (hosting), Ivs no longer work. I’ve looked at the…
-
1
votes1
answer77
viewsField with auto required in java script
I have my code where I select an item and the field fits each case. When number is selected the field returns a type given to be typed and works well (I received the hint in another question I asked…
-
1
votes1
answer62
viewsHow to improve the formatting of information within my Div?
Gentlemen, I need to format my Div according to the image attached below, with Meta information about Div, etc. Currently my code is breaking this information into lines, as attached image. Follow…
-
1
votes1
answer1341
views -
1
votes1
answer201
viewsHow to control height within a Grid?
Currently, I have the code below, I would like to descend to marca and meta to the edge of the red line, how can I move them ? html, body { width: 100%; height: 100%; margin: 0; padding: 0; } body {…
-
1
votes3
answers1706
viewsHow do I pass the time from one div to another?
I have this problem: the text is responsive, but how do I make the red divide the same size as the gray div next to it, as I decrease and enlarge the screen? There is a solution with CSS or with JS?…
-
1
votes0
answers59
viewsUpdate search field on a page after x query time
I’m making a query terminal using Wordpress + Woocommerce, as I will use barcode reader and will have ZERO interaction with keyboard and mouse, I need the field automatically reload a few seconds…
-
1
votes2
answers1839
viewsalignment of an html css image
I’m learning HTML and CSS now, and I’m having a question. When adding my logo I could only center it using text-align: center, but using float and other commands does not change its position, I…
-
1
votes2
answers343
viewsSelect any div from a foreach
Can someone help me? I have this problem when selecting the text inside the div, just select the first foreach text, wanted to select what I click and not only the first <?php foreach($dado as…
-
1
votes3
answers96
viewsGenerate HTML using Javascript
I have a small form for phone registration, and I want the user to be able to click the "Add new phone" button and an identical copy of the form is created below, so the user can put as many phones…
-
1
votes3
answers178
viewsWhile php creating div
I have a PHP code that creates div’s em while, but it took a lot of work to build it because we have to keep opening and closing quotes in the code, I wonder if you have the possibility to do the…
-
1
votes1
answer45
views -
1
votes3
answers388
viewsChange DIV gradient background with Hover on buttons
I am studying HTML5 and CSS3 through an EAD course. I made a screen with social networking buttons with effect by hovering over (just training). The button goes up and below appears the name of the…
-
1
votes3
answers95
viewsHow can I copy content from a div to a hiddenfield?
I have a div that displays the user’s IP, in which this address is picked up by Javascript. However, I need to use the IP in Code-Behind. The idea would be to copy the contents of the div to a…
-
1
votes2
answers511
viewsmargin-top has no effect on text within the div
I’m trying to apply margin-top in tag p of my text with the intention that it should come down, but I do not know why it is not working. Every time I apply the margin-top, the effect ends up being…
-
1
votes1
answer33
viewsDiv mother occupy all height of absolute content
I would like the mother div to fill in all vertical area, but with the code below I’m not getting it. Could you please help me? HTML: <div class="boxes"> <div class="box-01"> <div…
-
1
votes1
answer31
viewsHow to swap a div of place with script?
For example I have on the page: <div class="geral"></div> "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.…