Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Header configuration & styling (http://forum.bytesforall.com/forumdisplay.php?f=15)
-   -   Different styling for Logo, Title and Tagline. (http://forum.bytesforall.com/showthread.php?t=20584)

gnosis Jul 3, 2013 05:43 AM

Different styling for Logo, Title and Tagline.
 
Currently have:
ATO=>Style & edti HEADER AREA=>Configure Header Area:
<div id="mylogo"><a href="http://www.gc.cuny.edu"><img src="http://library.gc.cuny.edu/mrl365_2/wp-content/themes/atahualpa/images/gc_logo.jpg" alt="Mina Rees Library" /></a></div><h2 class="blogtitle"><a href="http://library.gc.cuny.edu/">Mina Rees Library</a></h2><p class="tagline"><a href="http://www.gc.cuny.edu/">CUNY Graduate Center</a></p>
%logo %pages %image


Based upon this thread:
http://forum.bytesforall.com/showthr...9927#post89927

How do I style the logo, title and taglines differently?

Do I need to do this:

<div id="mylogo"><a href="http://www.gc.cuny.edu"><img src="http://library.gc.cuny.edu/mrl365_2/wp-content/themes/atahualpa/images/gc_logo.jpg" alt="Mina Rees Library" /></a></div>

<div id="mytitle">
<h2 class="blogtitle"><a href="http://library.gc.cuny.edu/">Mina Rees Library</a></h2>
</div>

<div id="mytagline"><a href="http://www.gc.cuny.edu/">CUNY Graduate Center</a></p></div>

and then define the css on mylogo, mytitle, mytagline?
And if so where?

Also, please see:
http://forum.bytesforall.com/showthread.php?t=20562

juggledad Jul 3, 2013 05:59 AM

CSS has a set of precidence - ie the order the selectors are applied. In order to apply any css to a particular HTML element, the most specific CSS selector is the one that will apply first.
You have
HTML Code:

<div id="mylogo">
  <a href="http://www.gc.cuny.edu"><img src="http://library.gc.cuny.edu/mrl365_2/wp-content/themes/atahualpa/images/gc_logo.jpg" alt="Mina Rees Library" /></a>
</div>
<h2 class="blogtitle">
  <a href="http://library.gc.cuny.edu/">Mina Rees Library</a>
/h2>
<p class="tagline">
  <a href="http://www.gc.cuny.edu/">CUNY Graduate Center</a>
</p>

If you wrapped all that in another div with a unique ID you could use that ID so your CSS Selector will be the most specific andthe rules you code will be applied.

gnosis Jul 3, 2013 06:50 AM

Shouldn't title and tagline be in their own ids, if I want to apply different CSS?

juggledad Jul 3, 2013 06:55 AM

You should really take a CSS tutorial (http://www.htmldog.com/guides/css/) With the 'wrapped' div you can use that as the first selector to identify the elements.

gnosis Jul 3, 2013 08:28 AM

Got that, but wanted to understand how to implement in ATO

juggledad Jul 3, 2013 12:45 PM

Easy, write your CSS selector and rules and put them in the 'CSS Inserts' option which is a place to put CSS that you can't set in an option

gnosis Jul 3, 2013 12:49 PM

Perfect. So:

add new divIDs
and define IDs in CSS Inserts

juggledad Jul 3, 2013 02:06 PM

try it and let me know how it works.


All times are GMT -6. The time now is 06:35 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.