PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
It is currently Wed Sep 30, 2020 4:46 am

All times are UTC - 5 hours

Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Tue Sep 16, 2014 10:19 am 
DevNet Master

Joined: Wed Oct 08, 2008 3:39 pm
Posts: 4434
Location: United Kingdom
I am building a responsive product page.
The content is inside a DIV called "mainbodybox". This div has a 10 pixel padding on the left and right.

For Desktop, it's fine. I have a div called "gallery_image" that appears in the upper left corner.
For Mobile though, that div doesn't show, and a gallery_imagemobile div displays. However.. I want that div to be maximum width of the device screen, as it will be above all text.

This is how the DIVs are laid out:

Syntax: [ Download ] [ Hide ]
<div class='mainbodybox'><div class='product_rightbox'>
    <div class='product_gallerymobile'>
    <img src='/images/productphotos/$row->photoprimary' />

So product_rightbox is used for desktop to make stuff appear on the right. In this case though it appears at the very top.
I would just put a closing DIV after product_rightbox, then open mainbodybox again after the closing product_Gallerymobile div - however that messes up product_rightbox.

So I am wondering if there is a way to tell a DIV - "just max out the page".

I thought of z-index to bring it into the foreground, but as it is inside mainbodybox still, obviously it won't.

Not sure how else to accomplish this.

Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.

PostPosted: Tue Sep 16, 2014 12:29 pm 
User avatar

Joined: Tue Nov 09, 2010 3:39 pm
Posts: 6425
Location: Montreal, Canada


Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 5 hours

Who is online

Users browsing this forum: No registered users and 6 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group