PHP Developers Network

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

All times are UTC - 5 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Sun Feb 22, 2015 5:35 am 
Offline
DevNet Master

Joined: Wed Oct 08, 2008 3:39 pm
Posts: 4434
Location: United Kingdom
Syntax: [ Download ] [ Hide ]
display: table-footer-group;

I have a site where in the top DIV are two DIVs.

the logo one is on the left, and a box with a background image is on the right.

I've laid it out in CSS with Float left and Float right.
But on mobile, I want the "float right" one to cover after the logo (no float!). So the logo is on top of the "right" DIV.

So I did it with the css shown above, and display: table-header-group; for the logo div.

However, it's cause both these divs to block up ot a fixed width, rather than full width.

I have tried width: 100%, but that doesn't work. So how can I use this style, keeping the logo on the left, the other div on the right for desktop, while having the logo on top of the right div on mobile?

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


Top
 Profile  
 
PostPosted: Mon Feb 23, 2015 9:31 am 
Offline
Moderator
User avatar

Joined: Tue Nov 09, 2010 3:39 pm
Posts: 6425
Location: Montreal, Canada
You haven't really posted enough for us to see what's going on, but couldn't you just change the CSS rules in your media queries?

_________________


Top
 Profile  
 
PostPosted: Mon Feb 23, 2015 10:18 am 
Offline
DevNet Master

Joined: Wed Oct 08, 2008 3:39 pm
Posts: 4434
Location: United Kingdom
Well I'm only really asking because it seems that assigning that to a class, sets the box to a "block" width rather than the standard 100%, unless otherwise set.

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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 7 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