Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Combining Php and css divs

    Hi there guys i am developing an site using both php and css.
    My base for the design is a 960 grid system. with a style.css file for the design. and i am also using include files. My issue is as follows.
    I have a navigation bar under the top banner some options in the navigation bar point to css elements# and they are easy to stye, and other options dont point to any css #elements. They may point to some <?php ?>
    like log on or other phpcode.

    Now to the facts when i am clicking the buttons on the navigation bar i see
    a slight difference between in them on my browser. What would be the best remedy for this ? can i get the php code within a div or some thing like that.

    Thanks in advance guys....

  2. #2
    Linux Engineer
    Join Date
    Apr 2012
    Virginia, USA
    If you are using Firefox, you can install the plug-in called firebug. It will let you inspect elements as you browse, allowing you to adjust/edit properties and css.

    Once you figure out whatever your php script is creating html-wise by using firebug, just add the changes you need to the css.

    If something isn't named or part of a class in the html that is created, css lets you manipulate child objects of specific elements and classes. For instance:

    You have a div called "header", in css as #header
    In that div, you have a bunch of <a> tags, which don't have a class or name. You want to apply an attribute to all of those anchors, but not anywhere else on the page.
    In your css file, add an entry, such as
    #header a {
    Note, there is simply a space between the #header and 'a'. This means these attributes only apply to <a> elements that are children of #header.

    Hope this helps you.

  3. #3
    Thanks Mizzle. I will look into those things and see if i can find any differences and make som corrections accordingly.

  4. $spacer_open

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts