Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Centriranje slike
Author Message
Nathan Offline
Novi korisnik
*

Posts: 32
Joined: Feb 2008
Reputation: 0
Post: #1
Centriranje slike
ovako radim jednu stranicu u wordpress-u i sad sve sam ok napravio ali bi volio da centriram slike u header pri tome sam ja dodao jos jedan plugin tako da mi sam izmjenjuje slike evo kako kod izgleda

PHP Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html xmlns="http://www.w3.org/1999/xhtml">

<
head profile="http://gmpg.org/xfn/11">
    <
meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
    
    <
title><?php if (is_single() || is_page() || is_archive()) { wp_title('',true); } else { bloginfo('name'); echo(' — '); bloginfo('description'); } ?></title>
    
    <meta name="generator" content="WordPress <?php bloginfo('version'); ?>" /> <!-- leave this for stats -->
    
    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
    <link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/custom.css" type="text/css" media="screen" />
    <!--[if lte IE 7]>
    <link rel="stylesheet" type="text/css" href="<?php bloginfo('template_url'); ?>/ie7.css" media="screen" />
    <![endif]-->
    <!--[if lte IE 6]>
    <link rel="stylesheet" type="text/css" href="<?php bloginfo('template_url'); ?>/ie6.css" media="screen" />
    <![endif]-->
    <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />
    <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />

    <?php wp_head(); ?>
</head>
<body class="custom">

<div id="container">

    <div id="masthead">
        <h1><a href="<?php bloginfo('url'); ?>"><?php bloginfo('name'); ?></a></h1>
        <h3><?php bloginfo('description'); ?></h3>
    </div>

    <ul id="nav">
        <li><a <?php if (is_home()) echo('class="current" '); ?>href="<?php bloginfo('url'); ?>">Po&#269etna Stranica</a></li>
        <li><a <?php if (is_archive() || is_page('archives')) echo('class="current" '); ?>href="<?php bloginfo('url'); ?>/?cat=18">Arhiva</a></li>
        <li><a <?php if (is_page('about')) echo('class="current" '); ?>href="<?php bloginfo('url'); ?>/?page_id=43">O nama</a></li>
        <li><a <?php if (is_page('about')) echo('class="current" '); ?>href="<?php bloginfo('url'); ?>/?page_id=41">Slike</a></li>
        <li><a <?php if (is_page('about')) echo('class="current" '); ?>href="<?php bloginfo('url'); ?>/?page_id=54">Pjesme</a></li>
        <li class="rss"><a href="<?php bloginfo('rss2_url'); ?>">RSS</a></li>
    </ul>
    


    <div id="header_img">

    <?php
   
if (function_exists('generateRandomImgTag'))
   {
      
generateRandomImgTag();
   }
?>
    </div> 


e sada prema tome ja sam dodao ovaj dio

PHP Code:
<?php
   
if (function_exists('generateRandomImgTag'))
   {
      
generateRandomImgTag();
   }
?>

e kako bih ja to mogao centrirat znaci da sve te slike budu centrirane ??



Unaprijed hvala

http://katedrala-mostar.info
21-03-2008 01:29 PM
Find all posts by this user Quote this message in a reply
Gogy Offline
____
*

Posts: 2,352
Joined: Feb 2006
Post: #2
RE: Centriranje slike
Nema veze sa PHP-om pa je premješteno u prikladniji forum.

Probaj ovako:

PHP Code:
<div style="text-align: center; width: širina_headera_u_pixelima;">
<?
php
   
if (function_exists('generateRandomImgTag'))
   {
      
generateRandomImgTag();
   }
</
div>
?>

Pravila foruma | Twitter - Facebook - Google+ |


Radar404 <- moj blog
22-03-2008 08:54 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Nathan Offline
Novi korisnik
*

Posts: 32
Joined: Feb 2008
Reputation: 0
Post: #3
RE: Centriranje slike
Nisam uspio :( :(

Hvala Gogy :)

http://katedrala-mostar.info
22-03-2008 04:35 PM
Find all posts by this user Quote this message in a reply
Morrissey Offline
Forumaš
***

Posts: 695
Joined: Mar 2007
Reputation: 13
Post: #4
RE: Centriranje slike
PHP Code:
<div style="margin:0 auto;text-align: center; width: 800px;">
<?
php
   
if (function_exists('generateRandomImgTag'))
   {
      
generateRandomImgTag();
   }
?>
</div> 
(This post was last modified: 22-03-2008 05:00 PM by Morrissey.)
22-03-2008 05:00 PM
Find all posts by this user Quote this message in a reply
Nathan Offline
Novi korisnik
*

Posts: 32
Joined: Feb 2008
Reputation: 0
Post: #5
RE: Centriranje slike
nece pa nece ajde samo cu povecat sliku i gotovo :)

Hvala Morrison :)

http://katedrala-mostar.info
22-03-2008 05:09 PM
Find all posts by this user Quote this message in a reply
Goran Offline
Novi korisnik
*

Posts: 22
Joined: Nov 2006
Reputation: 0
Post: #6
RE: Centriranje slike
da probas <center></center> ?

Intel e8400 duo @ 3ghz | MSI P7n Platinum Sli | 4gb ram | Msi 9800gx2 | Scythe Mine | Mx518 | xp64
29-03-2008 03:41 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)