I already made a homepage including the grid system of bootstrap, but now im using mainly includes to keep everything tidy but the grid system doesnt seem to work at all. even if i copy the example code of bootstrap itself.
this is the first code of my content php file. including obviously the row part. These are stacked ontop of eachother not next to eachother.
PS: the .content-wrapper has no styling yet so its not affecting anything and the .content has only top and bottom padding.
<div class="content-wrapper">
<div class="content">
<h1>The Test Heading</h1>
<p>
text
</p>
</div>
<div class="row">
<div class="col-sm-6 col-md-6">
<div class="thumbnail">
<img src="..." alt="...">
<div class="caption">
<h3>Thumbnail label</h3>
<p>...</p>
<p>Button Button</p>
</div>
</div>
<div class="thumbnail">
<img src="..." alt="...">
<div class="caption">
<h3>Thumbnail label</h3>
<p>...</p>
<p>Button Button</p>
</div>
</div>
</div>
</div>
here is the index.php file i got with the content area
<div class="container">
<!-- Navigation area -->
<?php include_once ("php/navigation.php");?>
<!-- Carousel -->
<?php include_once ("php/carousel.php");?>
<!-- Content area -->
<?php include_once ("php/content.php");?>
</div> <!-- end of container -->
im not sure if it has to do something with including a file and the grid system, but carousel, container etc all working fine so it should find the css file after being included.
Sidequestion: is a method like this useful? working with includes only? or is it rather non-practical?
So what do u want to do with grid system, because you only have one col so it will just go from begining of file to col 6 it will look like it doesnt do anything rly? You can put lets say and then your div with col and it will move it and so on.
Related
I have a html structure like below, I want to place my custom header at a random position.
<div class="div1">
<div class="div2">
<?php echo do_shortcode('[header]'); ?>
</div>
<div class="div3"></div>
</div>
But it always make my header go to the bottom.
<div class="div1">
<div class="div2">
//I want the header to stay here
</div>
<div class="div3"></div>
<header>......</header>
</div>
However I place it, the header always go to the bottom, please give advice if you experience it.
UPDATE:
In my case, a specific class removed helped. Thanks everybody.
I have a simple website which I would like to add a row above the navigation that would contain a phone number and maybe some social links.
I am a theme called Hestia Pro and cannot find where to add this extra row
I am looking for some pointers as to where this would get added in the sites theme.
The website is www.gpoint.co.uk
Craig
Your theme is built with bootstrap
you can check your theme files and go to header.php
check the the tag <header>
and inside it you can add:
<header>
.....
<div class="row">
<div class="container">
<div class="col-sm-4">
Telephone
</div>
<div class="col-sm-4">
email
</div>
<div class="col-sm-4">
support
</div>
</div>
</div>
</header>
thats it :)
There is a pattern node is inserted into the slider (in an item):
<div class="item"> <!-- Wrap contents -->
<div class="image"> <!-- Insert image-->
<img src="<?=file_create_url($content['field_img_slide_1']['#items'][0]['uri'])?>"alt=""/>
</div>
<div class="desc">
<h2><?=$content['field_h1_slide_1']["#items"][0][value];?></h2> <!--Insert title-->
<div class="info"><?=$content['field_h2_slide_1']["#items"][0][value];?></di><!--Insert title 2-->
<?=$content['body']["#items"][0][value];?> <!--Insert text -->
</div>
</div>
The code of the slider:
<div class="m-slider">
<div class="sliderBox">
<?php print render(module_invoke('views', 'block_view', 'flock_salon-block_1')); // These items are inserted for the slider ?>
</div>
</div>
When I have only one slide, everything is displayed perfectly. When I add the second slide, it is displayed under the first (incorrectly displayed)
Slider screenshot: http://i65.fastpic.ru/big/2014/0807/96/25ac215abd233ee409ed3dd6459ced96.png
The second slide lies on top of the first
What prescribe in the template node to fix slider displaying?
This most often occurs when there are errors in running javascript code or finding a javascript file/library. Open up your developer tools (F12 in most major browsers) and check the console for errors that may be halting your code before it gets to rendering the slider functionality.
I am using theme Banshee on (http://adriangraphics.com/truturf/) and can't figure out how to put a header image (as seen on http://globalsynturf.com/) above the navigation. I want my logo, along with phone number, etc above the navigation on my WordPress site. I'm assuming I have to change the Header PHP, but unsure how.
In your header.php find:
<div class="row">
Then inside of this find:
<div class="3">
<div id="logo">
Take the contents of this entire div, and cut it.
Then above the <div class="row">, make the following:
<div class="row">
<div class="span12">
<div id="logo">
//rest of the logo code
</div>
</div>
</div>
We are currently building a mobile website using Jquery Mobile (1.1.0) and are using a multi-page template. We are using PHP to call MYSQL for dynamic content and have hit a brick wall with a certain object. When trying to call a simple image, it will not display. In viewing the source, it shows the correct image file name, however, it does not display. When removing Jquery Mobile, the image returns fine so I'm positive our variable is correct.
The code below is basically what we are using to call and echo out. ($data is an array with the page detail).
<div data-role="page" id="page">
<div data-role="header" data-position="fixed" class="header">
<div> PHONE NUMBER GOES HERE</div>
</div>
<div data-role="content">
<div class="logo">
<img src="img/logo.png" />
</div>
<h1>Page Title</h1>
<p>:: <span><?php echo $data['img']; ?></span> :: </p>
</div>
</div>
As stated previously, this code produces results in the page source but on the actual page it outputs <span> :: :: </span>. If anyone can help it would be much appreciated.
try:<img src="image_location/<?php echo '.$data['img'].'; ?>"/>
Place the PHP code inside
<div data-role="page" id="page">
// php code here
<!-- All the HTML goes here -->
</div><!-- End of #page -->
Its needed as the page content is loaded using jQuery AJAX call. In that case whatever code is there outside <div data-role="page" id="page"> will not get executed in the AJAX call.