Jump to content

Archived

This topic is now archived and is closed to further replies.

Keith Vaugh

Text alignment - Masthead

Recommended Posts

Keith Vaugh

Hi all

 

I want to align the text in a masthead to the left. I have added the following in the custom css:

.left-align {
text-align: left;
}

and in the custom styling classes for the masthead in question defined:

left-align

it has had no affect. 

 

Is there something that I am missing?

Thanks

Keith

Share this post


Link to post
Share on other sites
Danny

Hi Keith,

Can you provide a link to the site in question please.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
Keith Vaugh

Hi Danny

 

Belated happy new year.

 

The site is not online yet only in a local development environment. It seems such an easy think to do (align the masthead text to the left instead of centre) but doesn't seem to want to do it. I could simply target the masthead itself, but may want other mastheads centred elsewhere...

 

Keith 

Share this post


Link to post
Share on other sites
Danny

OK, the reason as to why this isn't working is the because the Masthead title and Masthead P tag already have CSS styling that centers the header and text. Therefore, the styling classes field option will not work, as the class is applied to the section element and not the masthead title and p tag.

 

Therefore, you're going to need to override the following:

 

.masthead h1, .masthead p {
text-align: center;
}

Please search our forums, before posting!

Share this post


Link to post
Share on other sites
Keith Vaugh

Thanks Danny. Was afraid that might be the case. I am sure I can clone the section and target it the ID of the relevant masthead.

Share this post


Link to post
Share on other sites
Danny

You can add a class to that particular masthead and then apply the CSS that way for example, add the following class (or anything you like) to the mastheads styling classes field:

 

masthead-left

 

Then add the following CSS:

 

.masthead-left .masthead h1, .masthead p {

text-align: center;
}
 
This way the Masthead with that class will have its text aligned left and it will not effect the other Mastheads that don't have this class.

Please search our forums, before posting!

Share this post


Link to post
Share on other sites
Keith Vaugh

Thanks Danny. Will give that a try

Share this post


Link to post
Share on other sites

  • Similar Content

    • Lisa Haran
      By Lisa Haran
      Hi 
      I have a map here http://www.iloveoffset.com/maps/
      I want to add several pointer locations to the map, but when I do they do not appear.
      On this map there are 2 pointer locations and as you can there is only one visible.
      Earlier today I added 7 and could only see 4 so there is something odd going on.
      My theme is up to date
    • clj182
      By clj182+
      Hello,
      I've been having trouble unlocking the template section for past couple of weeks. When I try clicking nothing happens. 
      I've deleted my custom css and removed plugins. Im down to having only the following plugins:
      Akismet
      Contact Form 7
      DMS Professional Tools
      Pagelines Updater
      WooCommerce
      It was working fine before i have no idea what's going on with it.
    • flourishdesignstudio
      By flourishdesignstudio+
      My DMS 2 site http://www.heart-stone.com/ will not save any new custom css... I can still edit templates and publish those but any custom css that I enter never saves.
      All WP files, themes, and plugins are up to date. 
      Any thought about what might be causing this?
    • flourishdesignstudio
      By flourishdesignstudio+
      Is there a way to edit the custom CSS via FTP? I know I can edit the custom code in the Chrome editor but is there a file path I can use to find and edit the CSS directly from our FTP?
      Thanks in advance for the help!
    • nizami
      By nizami+
      Using navbar section with correctly configured WP menu to display main navigation at https://elenaangel.com. 
      All fine in desktop viewport. Menu displays twice in hamburger mode. How to fix this please? 

×