Results 1 to 3 of 3
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. ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 08-05-2012 #1Just Joined!
- Join Date
- Oct 2011
- Posts
- 47
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....
- 08-08-2012 #2Linux Enthusiast
- Join Date
- Apr 2012
- Location
- Virginia, USA
- Posts
- 563
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.
- 08-16-2012 #3Just Joined!
- Join Date
- Oct 2011
- Posts
- 47
Thanks Mizzle. I will look into those things and see if i can find any differences and make som corrections accordingly.


Reply With Quote
