I am enclosing an external php menu between html center tags. It centers as it should, but then the $content also ends up being centered. I have check the menu generator about 10 times, there are no unclosed tags or syntax errors. I have searched the archives here.
So here is what I have embedded in page.tpl.php
<?php
echo "<center>" ;
Primary links in Navbar 2 years 46 weeks agoNot sure if theme development is the place to post this question, but here it is:
As a complete Drupal noob, and css wimp I'm baffled.
I've created a Zen subtheme and am trying to get the primary links to center in the navbar. Right now they are aligned to the left.
I've tried text-align: center; and float: center; in primary links and in navbar blocks on the site css sheet. I've tried the same on the layout sheet in both the navbar and navbar inner links. Nothing seems to be working for me.
Any idea on what ridiculously simple thing is going wrong?
center website 3 years 44 weeks agogrtz,
It's been a while since I made sites with drupal, so I have to figure some things out again.
I've tried to center my drupal site with tags like (#)page, width attributes, ... but it doesn't work out for me.
I would just like to center my complete website, say with a width of 1000 px by example.
How can I do this?
thanks
Added a Block to the Header Region, Placed an Image in That Block and Would Like to Have it Aligned Center 1 year 14 weeks agoI am working on a site built on Drupal 7.x and added a new block to the header region. In that block I have an image file that I would like to have aligned center. I am using WYSIWYG with the CKeditor. When I go to the image properties in WYSIWYG it only gives the options to align the image left or right which works fine but I want to center the image. I tried to center the image in WYSIWIG using the txt align center button which shows up fine in the WYSIWYG preview pane but when I save the block it still aligns left. I am currently using the Garland theme in fluid width.
Align the content to the center 3 years 14 weeks agoI have successfully setup and installed Drupal. Now, I would like the layout of my website to be occupying only 60% width but right at the center.
To accomplish this, I removed the left and right blocks, and am only using the content block. But, this results in the content occupying 100% width.
I used Chrome's inbuilt debugger to change a few CSS attributes. If I reduce the content width then it becomes left aligned. If I use text-align:center, it only centers the text content, but the block remains on the left.
Views within a block 3 years 30 weeks agoI have three quick conceptual questions if someone could please help me. I just need some direction as I am not very good with CSS or PHP. Any help would be greatly appreciated.
1) I have my views exporting a table into a block. I cannot get the block to center the table inside the block so it has equal padding on both sides. I don't want the content inside the table to be centered, but the table to be centered inside the block. What file would I change to accomplish this?
Insert <div> tags around .img in $content 3 years 42 weeks agoHello folks,
I'm trying to automatically center images in my content block. As you certainly know, the best way to center .img objects is to insert them in a "div" tag having the "text-align : center" propriety, as the "margin-left, margin-right: auto" trick doesn't work.
I couldn't find other posts on this precise topic, and I can't code php. Does someone know what I should do to insert div class="center" and end of div around my .img objects in the $content block?
Thank you for your patience and maybe for your help,
Sam