Jump to content
xisto Community
Sign in to follow this  
darran

Need Help In Web Design Of Site

Recommended Posts

Just the same, except there is a pinch of php in that one to define the location of the file.

<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />

Simply add another link tag below this as per the above pposting, within the conditional statements, using the path to the css file.A sample might be as follows:

<!--[if IE 7]><link rel="stylesheet" href="/path/to/css file/here/IEstyle.css" type="text/css" media="screen" /><![endif]-->

Do a view source to find out where the other css files are stored on your account and place the IE specific CSS file in the same folder on the Host while using the same "path/to/css file/here" (replacing the actual path, of course). :PWho knows, this might work...

Share this post


Link to post
Share on other sites

!important tells standards-compliant browsers to ignore any changes to that attribute in child elements. It works with anything, font-weight, border, whatever, just not on Microsoft browsers. :P

i kinda think i'm gona use this feature now and then :D .. thanks for the tip

Share this post


Link to post
Share on other sites

The style basically controls the look and feel of my entire weblog. Shouldn't the Ie7 style also consist of almost everything in my original style with the exception of the bottom tag?

Share this post


Link to post
Share on other sites

Other way around.

You only need the IE7 specific code in the IE7 css file.

This file will contain just the alterations required for the specific Browsers.

 

Let's say you have a css file which contains the following:

#this_div { margin-top: 100px; padding left 300px; text-decoration:underline; font-weight: 400;}
but IE7 needs to be different, say you only want the margin-top to be 50px, then the only thing you need to place in the IE7 file is the following:

#this_div { margin-top: 50px; }
Everything else will "inherit" from the original CSS file, but the original CSS file must be declared in your code first. (see previous posting).

 

Make sense to you now? Any more questions- keep posting them.

Share this post


Link to post
Share on other sites

I think it is coming to me now. Originally, I have the style.css to handle all my visuals but IF the browser detects it is using IE7, it will also call the ie7.css which will overwrite whatever is written in the #bottom tag in style.css? Am I right to say that? And lets say I want it to call this ie7.css when it is using IE6 or lower versions, how do I put it?

Share this post


Link to post
Share on other sites

The conditional statement can be adjusted to determine which version of IE is asking for the file. Examples would be lt, gt, lte, !lt,!gte, etc, the same as programming logical if's and the NOT operator (!).

More info can be found at the Microsoft site.

http://forums.xisto.com/no_longer_exists/

http://forums.xisto.com/no_longer_exists/

Share this post


Link to post
Share on other sites

I have just had a quick glimpse on the site and they said that <!--[if IE]> handles IE 5 - IE 6, but what about IE7? Does this handle IE7 as well? I am pretty much settled on this problem being fixed even if it has, without using the conditionals, but I would like to use this conditionals, so that it does not in 1 way or another break apart my css.

Share this post


Link to post
Share on other sites

As I understand it, you can alter the conditional to target only specific versions. Let's say that you wanted to post a background image of the png variety. Example 1IE6 or earlier doesn't handle the png format, so the conditional could be written to only post the png version to <!--[if gt IE6]>, insert the css file with the body having the png format.Example 2IE7 does handle the png format, so you decide to post the gif image on your regular site, but to post a png version to IE7, then <!--[if IE7]>Point is that you can target specific instances using the conditionals. Personally, the conditional method is more solid than the Hack method, in my mind.

Share this post


Link to post
Share on other sites

After doing some pondering, I am not sure if I want to make my code more complicated when I have a site which is compatible in Firefox 2.0 as well as IE 6 and 7. Perhaps if I ever encounter a problem which needs specific solutions to different browsers, I would use the conditionals. Right now, I have found a common solution so I guess I will leave it at that. Thanks for the replies though, I have gained an extra gram of knowledge with conditionals in web programming.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.