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.

cakephp layout problem

Featured Replies

Hi folks

 

Hope this is the right forum to post this in :)

 

What it is, I have a problem with a <div> inside a heading <div> it looks like its added margin or padding and a br tag without been asked to. I want the two lines of text to be closer together, like without a line space and want it to be the same sort of margin and padding as the logo.

 

Heres link:

 

and its the bit with the Namesco logo and to the right the text. The text is the problem (some might be hidden due to header height)

http://www.amazingvouchercodes.co.uk/vouchers/voucher_detail/names.co.uk/free-email-with-every-domain-1

 

Code:

 

PHP:

 

<div class="vd_heading">
<div class="logo-client">
<?php
	$srcPath='';
	if(!empty($voucher['Voucher']['image_url'])){ 
		$srcPath=$voucher['Voucher']['image_url']; 
	} else { 
		$srcPath=$voucher['Retailer']['logo']; 
	} 
?>
<img src="<?php echo $srcPath; ?>" height="60px" width="234px" alt="<?php echo $Retailer['Retailer']['title'];?>" />
</div>

<div class="vdtitle">
	<h4><?php echo $Retailer['Retailer']['title']. ' - ' .$voucher['Voucher']['title'];?></h4>
	<?php 

		$strtime = strtotime($voucher['Voucher']['expires']);
		$current = strtotime(date('Y-m-d 00:00:00'));

		if($current > $strtime) {
			echo __('Expired',true).'  : ';
		}else{
			echo __('Expires',true).' : ';
		}

		if($current == $strtime){
			echo '(Today - '. ''. date('jS,', $strtime).' '.__(date('F', $strtime),true). date(', Y', $strtime). ')';
		}else{
			echo  date('jS', $strtime).' '.__(date('F', $strtime),true). date(', Y', $strtime);//date('jS F, Y', $strtime).')';
		}

	?>
</div>
</div>

 

CSS:

 

.vd_heading {
width: 800px;
height: 80px;
overflow: hidden;
}
.logo-client {
padding-left: 15px;
padding-top: 15px;
float: left;
}

.vdtitle {
margin: 0px;
padding-top: 15px;
padding-right: 15px;
float: right;
}

 

If you need any more info please ask :) Thanks in advance guys

 

Joe :)

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.