Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Nested Divs below each other

Featured Replies

Hi,

 

Within the main page content holder of the page I have 3 div tags.

 

 

#contactdetailholder1 {

position:relative;

left: 0px;

top: 0px;

width: 600px;

padding:0px;

border:0px;

margin: 0px;

z-index: 4;

}

 

Within that

 

Within in that there are 2 more divs which are

 

#box1 {

position:absolute;

left: 0px;

top: 0px;

width: 295px;

padding:5px;

border:0px;

margin: 0px;

}

#box2 {

position:absolute;

left: 300px;

top: 0px;

width: 295px;

padding:5px;

border:0px;

margin: 0px;

}

 

What I'd like to do is repeat the div contactdetailholder1 (with the 2 nested divs) several times vertically - changing the text within the 2 nested divs. (It's for a contact page obviously).

 

I'm tempted to use tables but don't want to if it can be avoided. I'm sure this is easy but I just can't get it and it's 4pm Sunday afternoon, the sun's shining and I'm going for a beer.

 

So thanks for any help.

 

Jo.

Hi there. Just repeat what you've got but change your ids to classes.

<div class="contactdetailholder">
<div class="box1">
</div>
<div class="box2">
</div>
</div>

<div class="contactdetailholder">
<div class="box1">
</div>
<div class="box2">
</div>
</div>

<div class="contactdetailholder">
<div class="box1">
</div>
<div class="box2">
</div>
</div>

 

.contactdetailholder {
position:relative;
left: 0px;
top: 0px;
width: 600px;
padding:0px;
border:0px;
margin: 0px;
z-index: 4;
}
.box1 {
position:absolute;
left: 0px;
top: 0px;
width: 295px;
padding:5px;
border:0px;
margin: 0px;
}
.box2 {
position:absolute;
left: 300px;
top: 0px;
width: 295px;
padding:5px;
border:0px;
margin: 0px;
}

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.