Advertisement:

Author Topic: (SOLVED) Header  (Read 1841 times)

Rotchel1989

  • Guest
(SOLVED) Header
« on: August 16, 2015, 11:28:46 am »
Hi,

When i change the Login and Register Color to #FFFFFF
there is other text parts that change also!

Is this a problem from my header.php file?

<body <?php osclasswizards_body_class(); ?>>
<header id="header">
  <div class="top_links">
    <div class="container">
      <div class="language">
        <?php ?>
        <?php if ( osc_count_web_enabled_locales() > 1) { ?>
        <?php osc_goto_first_locale(); ?>
        <strong>
        <?php _e('Language:', OSCLASSWIZARDS_THEME_FOLDER); ?>
        </strong> <span>
        <?php $local = osc_get_current_user_locale(); echo $local['s_name']; ?>
        <i class="fa fa-caret-down"></i></span>
        <ul>
          <?php $i = 0;  ?>
          <?php while ( osc_has_web_enabled_locales() ) { ?>
          <li><a <?php if(osc_locale_code() == osc_current_user_locale() ) echo "class=active"; ?> id="<?php echo osc_locale_code(); ?>" href="<?php echo osc_change_language_url ( osc_locale_code() ); ?>"><?php echo osc_locale_name(); ?></a></li>
          <?php if( $i == 0 ) { echo ""; } ?>
          <?php $i++; ?>
          <?php } ?>
        </ul>
        <?php } ?>
      </div>     
      <ul>
        <?php if( osc_is_static_page() || osc_is_contact_page() ){ ?>
        <li class="search"><a class="ico-search icons" data-bclass-toggle="display-search"></a></li>
        <li class="cat"><a class="ico-menu icons" data-bclass-toggle="display-cat"></a></li>
        <?php } ?>
        <?php if( osc_users_enabled() ) { ?>
        <?php if( osc_is_web_user_logged_in() ) { ?>
        <li class="first logged"> <span><?php echo sprintf(__('Hi %s', OSCLASSWIZARDS_THEME_FOLDER), osc_logged_user_name() . '!'); ?> </span> &#10072; <strong><a href="<?php echo osc_user_dashboard_url(); ?>">
          <?php _e('My account', OSCLASSWIZARDS_THEME_FOLDER); ?>
          </a></strong> &#10072; <a href="<?php echo osc_user_logout_url(); ?>">
          <?php _e('Logout', OSCLASSWIZARDS_THEME_FOLDER); ?>
          </a> </li>
        <?php } else { ?>
        <li><a id="login_open" href="<?php echo osc_user_login_url(); ?>">
          <?php _e('Login', OSCLASSWIZARDS_THEME_FOLDER) ; ?>
          </a></li>
        <?php if(osc_user_registration_enabled()) { ?>
        <li><a href="<?php echo osc_register_account_url() ; ?>">
          <?php _e('Register for a free account', OSCLASSWIZARDS_THEME_FOLDER); ?>
          </a></li>
        <?php }; ?>
        <?php } ?>
        <?php } ?>
      </ul>
    </div>
  </div>
  <div class="main_header" id="main_header">
    <div class="container">
      <div id="logo"> <?php echo logo_header(); ?> <span id="description"><?php echo osc_page_description(); ?></span> </div>
      <h2 class="pull-right toggle"><i class="fa fa-align-justify"></i></h2>
      <ul class="links">
        <?php
        osc_reset_static_pages();
        while( osc_has_static_pages() ) { ?>
        <li> <a href="<?php echo osc_static_page_url(); ?>"><?php echo osc_static_page_title(); ?></a> </li>
        <?php
        }
      osc_reset_static_pages();
        ?>
        <li> <a href="<?php echo osc_contact_url(); ?>">
          <?php _e('Contact', OSCLASSWIZARDS_THEME_FOLDER); ?>
          </a> </li>
      </ul>
      <div class="publish">
        <?php if( osc_users_enabled() || ( !osc_users_enabled() && !osc_reg_user_post() )) { ?>
        <a class="btn btn-success" href="<?php echo osc_item_post_url_in_category() ; ?>">
        <?php _e('Publish your ad for free', OSCLASSWIZARDS_THEME_FOLDER);?>
        </a>
        <?php } ?>
      </div>
    </div>
  </div>
  <?php
   if( osc_is_home_page() ) {
      if(osc_get_preference('show_banner', 'osclasswizards_theme')=='1'){
         echo '<div id="header_map">';
         if(homepage_image()) {
            echo homepage_image();
         } else {
         
            echo '<img src="'.osc_current_web_theme_url('images/banner.jpg').'" />';

         }
         echo '</div>';
      }
?>
  <div class="banner_none" id="form_vh_map">
    <form action="<?php echo osc_base_url(true); ?>" id="main_search" method="get" class="search nocsrf" >
      <div class="container">
        <input type="hidden" name="page" value="search"/>
        <div class="main-search">
          <div class="form-filters">
            <div class="row">
              <div class="col-md-4">
                <div class="cell">
                  <input type="text" name="sPattern" id="query" class="input-text" value="" placeholder="<?php echo osc_esc_html(__(osc_get_preference('keyword_placeholder', 'osclasswizards_theme'), OSCLASSWIZARDS_THEME_FOLDER)); ?>" />
                </div>
              </div>
              <div class="col-md-3">
                <?php  if ( osc_count_categories() ) { ?>
                <div class="cell selector">
                  <?php osc_categories_select('sCategory', null, __('Select a category', OSCLASSWIZARDS_THEME_FOLDER)) ; ?>
                </div>
                <?php  } ?>
              </div>
              <div class="col-md-3">
                <div class="cell selector">
                  <?php if(osclasswizards_search_select() == 'region'){?>
                  <?php osclasswizards_regions_select('sRegion', 'sRegion', __('Select a region', OSCLASSWIZARDS_THEME_FOLDER)) ; ?>
                  <?php }else{?>
                  <?php osclasswizards_cities_select('sCity', null, __('Select a city', OSCLASSWIZARDS_THEME_FOLDER)) ; ?>
                  <?php } ?>
                </div>
              </div>
              <div class="col-md-2">
                <div class="cell reset-padding">
                  <button  class="btn btn-success btn_search">
                  <?php _e("Search", OSCLASSWIZARDS_THEME_FOLDER);?>
                  </button>
                </div>
              </div>
            </div>
          </div>
          <div id="message-seach"></div>
        </div>
      </div>
    </form>
  </div>
  <?php
   
   }
?>
  <?php osc_show_widgets('header'); ?>
</header>
<div class="wrapper-flash">
  <?php
        $breadcrumb = osc_breadcrumb('&raquo;', false, get_breadcrumb_lang());
        if( $breadcrumb !== '') { ?>
  <div class="breadcrumb">
    <div class="container"> <?php echo $breadcrumb; ?> </div>
  </div>
  <div class="container">
    <div class="error_list">
      <?php
        }
    ?>
      <?php osc_show_flash_message(); ?>
    </div>
  </div>
</div>
<?php osc_run_hook('before-content'); ?>
<div class="wrapper" id="content">
<div class="container">
<?php if( osc_get_preference('header-728x90', 'osclasswizards_theme') !=""){ ?>
<div class="ads_header ads-headers"> <?php echo osc_get_preference('header-728x90', 'osclasswizards_theme'); ?> </div>
<?php } ?>
<div id="main">
« Last Edit: August 18, 2015, 07:03:25 am by Rotchel1989 »

Hennessy Pappy

  • Jr. Member
  • **
  • Posts: 52
  • r1
Re: Girl Student needs help with Header
« Reply #1 on: August 16, 2015, 11:36:13 am »
Surely they are sharing the same class you can inspect it in your browser.

Rotchel1989

  • Guest
Re: Girl Student needs help with Header
« Reply #2 on: August 16, 2015, 11:42:37 am »
Is it possible to delete the first <div class="container">

And to add the login and register to the main-header?

Same way like the Bender theme?


fog

  • Hero Member
  • *****
  • Posts: 1062
Re: Girl Student needs help with Header
« Reply #3 on: August 16, 2015, 05:05:56 pm »
Hi,

No, don't do that, the container class, you need that for keep in place your content (inside of layout).

Use your style with ID. Per example in user login link, you already have the id "login_open":
Code: [Select]
<a id="login_open" href="<?php echo osc_user_login_url(); ?>">
          <?php _e('Login'OSCLASSWIZARDS_THEME_FOLDER) ; ?>
          </a>
In your css file found the #login_open, if not exists, add before the responsive code:
Code: [Select]
#login_open{color : #FFF;}
And user register link, create a new an unique ID, and do the same process:
Code: [Select]
<a id="your_new_id_name" href="<?php echo osc_register_account_url() ; ?>">
          <?php _e('Register for a free account'OSCLASSWIZARDS_THEME_FOLDER); ?>
          </a>
You can create new ID for unique links, remember the ID need be unique, you cannot repeat the same ID, otherwise you need use class's (per example, for listings links you cannot use ID, only class)

Regards.

Rotchel1989

  • Guest
Re: Girl Student needs help with Header
« Reply #4 on: August 16, 2015, 06:14:15 pm »
This is the color code i apps.css
a, .listings ul li.last a:hover, .language span:hover {color: #a09f9f;

The header and main use ul li
is it possible to change the header in a div?

fog

  • Hero Member
  • *****
  • Posts: 1062
Re: Girl Student needs help with Header
« Reply #5 on: August 16, 2015, 11:08:19 pm »
Yes can you. You need see in css files if header tag is related with some css code, and add that code for your new div (class or id) in this case is an id.
But I think it no make much sense what you trying to do. Be more specific with what you trying to obtain as a final result.

EDIT:


header tag is needed in HTML construction. So I recommend you create a div inside the header tag, if you really need it for englobe all content of header.

Or just leave this and use only id of header, or create a new class for what you trying to do in css part, right?

In your case if is the language menu, you have the language class for use in css:
Code: [Select]
.language ul li{}
.language ul li a{}
.... continue ...
And you don't need change the HTML structure.
Regards
« Last Edit: August 16, 2015, 11:30:02 pm by fog »