Author Topic: div help please  (Read 874 times)

0 Members and 1 Guest are viewing this topic.

Offline Bashy

  • brecklandweather.com/meteo
  • Forecaster
  • *****
  • Posts: 1465
  • brecklandweather.com/index.php
    • Breckland Weather
div help please
« on: June 03, 2017, 03:34:04 AM »
Hi folks

the code below is the current conditions block, i would like to add 1 column to the left side that will span the full depth, is this possible please, if so, how, cause im struggling  :???:



Code: [Select]
<div style="display:inline-block;vertical-align:top;margin:0 auto;width:98%" id="currentBlockMainDiv">
<div class="currentBlockDivs" id="currentBlockDivT">
<span class="mticon-temp conditionsIcon tooltip" alt='' title="<?php echo lang('temperature','c')?>"></span><br><span id="currentTValue"></span><br>°<?php echo $displayTempUnits?><div class="currentBlockTrend" id="currentBlockTrendT"></div><div class="currentBlockWarning" id="currentBlockWarningT"><span class="mticon-warninggeneral"></span></div>
</div>
<div class="currentBlockDivs" id="currentBlockDivH">
<span class="mticon-humidity conditionsIcon tooltip" alt='' title="<?php echo lang('humidity','c')?>"></span><br><span id="currentHValue"></span><br>%<div class="currentBlockTrend" id="currentBlockTrendH"></div><div class="currentBlockWarning" id="currentBlockWarningH"><span class="mticon-warninggeneral"></span></div>
</div>
<div class="currentBlockDivs" id="currentBlockDivP">
<span class="mticon-pressure conditionsIcon tooltip" alt='' title="<?php echo lang('pressure','c')?>"></span><br><span id="currentPValue"></span><br><?php echo unitFormatter($displayPressUnits)?><div class="currentBlockTrend" id="currentBlockTrendP"></div><div class="currentBlockWarning" id="currentBlockWarningP"><span class="mticon-warninggeneral"></span></div>
</div>
<div class="currentBlockDivs" id="currentBlockDivW">
<span class="mticon-wind conditionsIcon tooltip" alt='' title="<?php echo lang('wind speed','c')?>"></span><br><span id="currentWValue"></span> <?php echo unitFormatter($displayWindUnits)?><div class="currentBlockTrend" id="currentBlockTrendW"></div><span id="currentBValue"></span><div id="currentWBft" class="currentBeaufort"></div><div class="currentBlockWarning" id="currentBlockWarningW"><span class="mticon-warninggeneral"></span></div>
</div>
<div class="currentBlockDivs" id="currentBlockDivG">
<span class="mticon-gust conditionsIcon tooltip" alt='' title="<?php echo lang('wind gust','c')?>"></span><br><span id="currentGValue"></span><br><?php echo unitFormatter($displayWindUnits)?><div class="currentBlockTrend" id="currentBlockTrendG"></div><div id="currentGBft" class="currentBeaufort"></div><div class="currentBlockWarning" id="currentBlockWarningG"><span class="mticon-warninggeneral"></span></div>
</div>
<br />
<div class="currentBlockDivs" id="currentBlockDivR">
<span class="mticon-rain conditionsIcon tooltip" alt='' title="<?php echo lang('precipitation','c')?>"></span><br><span id="currentRValue" style="font-size:0.7em"></span><span style="font-size:0.7em">&nbsp;<?php echo $displayRainUnits?></span><br><span style="font-size:0.7em" id="currentRRValue"></span><span style="font-size:0.7em">&nbsp;<?php echo $displayRainUnits."/".lang('hAbbr','l')?></span><div class="currentBlockWarning" id="currentBlockWarningR"><span class="mticon-warninggeneral"></span></div>
</div>
<div class="currentBlockDivs" id="currentBlockDivD">
<span class="mticon-dewpoint conditionsIcon tooltip" alt='' title="<?php echo lang('dew point','c')?>"></span><br><span id="currentDValue"></span><br>°<?php echo $displayTempUnits?><div class="currentBlockTrend" id="currentBlockTrendD"></div><div class="currentBlockWarning" id="currentBlockWarningD"><span class="mticon-warninggeneral"></span></div>
</div>
<div class="currentBlockDivs" id="currentBlockDivA">
<span class="mticon-apparent conditionsIcon tooltip" alt='' title="<?php echo lang('apparent temperature','c')?>"></span><br><span id="currentAValue"></span><br>°<?php echo $displayTempUnits?><div class="currentBlockTrend" id="currentBlockTrendA"></div><div class="currentBlockWarning" id="currentBlockWarningA"><span class="mticon-warninggeneral"></span></div>
</div>
<?php
if($solarSensor){
?>

<div class="currentBlockDivs" id="currentBlockDivS">
<span class="mticon-sun conditionsIcon tooltip" alt='' title="<?php echo lang('solar radiation','c')?>"></span><br><span id="currentSValue"></span><br>W/m2<div class="currentBlockWarning" id="currentBlockWarningS"><span class="mticon-warninggeneral"></span></div>
</div>
<?php
}
?>

<?php
if($UVsensor){
?>

<div class="currentBlockDivs" id="currentBlockDivUV">
<span class="mticon-uv conditionsIcon tooltip" alt='' title="<?php echo lang('UV','c')?>"></span><br><span id="currentUVValue"></span><div class="currentBlockWarning" id="currentBlockWarningUV"><span class="mticon-warninggeneral"></span></div>
</div>
<?php
}
?>

</div>
Kind regards
Bashy

Offline Jasiu

  • Forecaster
  • *****
  • Posts: 949
    • LexMAWeather
Re: div help please
« Reply #1 on: June 03, 2017, 09:45:33 PM »
Can you post the URL to the site? Need a bit more context than the code snippet.
https://lexmaweather.info
On Mastodon: @LexMAWeather@toot.community

Offline Bashy

  • brecklandweather.com/meteo
  • Forecaster
  • *****
  • Posts: 1465
  • brecklandweather.com/index.php
    • Breckland Weather
Re: div help please
« Reply #2 on: June 04, 2017, 12:40:34 AM »
Hi, thanks for the reply

The site is http://www.brecklandweather.com/template/indexDesktop.php?desktop=true
The top middle block with the current condition icon and data, more specifically the current conditions data :)
You  see how they look now, thats 2 separate blocks, i am trying to join them...
Kind regards
Bashy

Offline Jasiu

  • Forecaster
  • *****
  • Posts: 949
    • LexMAWeather
Re: div help please
« Reply #3 on: June 04, 2017, 08:32:15 AM »
Still not sure what the final product is that you are looking for - maybe a picture would help?

You are using a combination of both tables and divs for content formatting, which somewhat complicates things (I avoid tables for this purpose and rely on divs and CSS).
https://lexmaweather.info
On Mastodon: @LexMAWeather@toot.community

Offline Bashy

  • brecklandweather.com/meteo
  • Forecaster
  • *****
  • Posts: 1465
  • brecklandweather.com/index.php
    • Breckland Weather
Re: div help please
« Reply #4 on: June 04, 2017, 10:20:33 AM »
Hi Jasiu

I have added an image, hope it makes things clearer?
Kind regards
Bashy