CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 2/21/2007 9:31:16 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 1 Views: 14 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
2 Items, 1 Pages 1 |< << Go >> >|
NoBullMan
Asp.Net User
CSS problem with different browsers2/21/2007 9:31:16 PM

0/0

Hi,

I have used CSS to style my pages. It seems that IE6, IE7 and FF interpret some of the styles differently, depending how they have interpreted the "box" model.

For example, the footer in my page looks good in IE6 but in IE7 and FF it sticks out of the container because it adds the border width of the container to the width of the footer.

I am not sure about this but I think the only way to get around it is to use the Request.Browser property to determine what browser the user is using and use appropriate stylesheets.

Questions:

Is this the right way to handle this problem?

If so, once I determined what browser the user is using, how can I dynamically set the style sheets to be used in master pages?

 Thanks.
 

tfsmag
Asp.Net User
Re: CSS problem with different browsers2/22/2007 2:04:57 AM

0/0

I've done this on several projects, making your stylesheet dynamic is easy... In my opinion it is a perfectly acceptable and valid way to make sure your website renders correctly in all browsers.

first you make your stylesheet link a server control by adding an id and runat="server" to it like this

     <link runat="server" rel="stylesheet" id="cssIE" type="text/css" />

 

then in the page_load event on your code behind, you can control it...

        If Page.Request.Browser.Browser = "IE" Then
            ieHeight.Text = "<style>#contentAreaFormat{height:450px;}</style>"
            cssIE.Href = "/css/agcIE.css"
        Else
            cssIE.Href = "/css/agc.css"
        End If


------------------------------------------------
Jeff Turner (simpleModus)

Don't forget to mark the correct answer for your
question to help out future visitors!
2 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Dreamweaver CS3 For Dummies Authors: Janine Warner, Pages: 434, Published: 2007
Designing with Javascript: Creating Dynamic Web Pages Authors: Nick Heinle, Bill Peña, Pages: 216, Published: 2002
Dreamweaver CS3: The Missing Manual Authors: David Sawyer McFarland, Pages: 995, Published: 2007
Designing with Web Standards Authors: Jeffrey Zeldman, Pages: 436, Published: 2003
CSS Hacks and Filters: Making Cascading Style Sheets Work Authors: Joseph W. Lowery, Pages: 266, Published: 2005
Dynamic Learning: Dreamweaver CS3 Authors: Fred Gerantabee, AGI Creative Team, AGI Creative Team, Pages: 400, Published: 2007
Microsoft FrontPage 2002 Unleashed Authors: William R. Stanek, David Berry, Duane Hellums, Mark Ray, Jinjer Simon, Pages: 1184, Published: 2002
Head First HTML with CSS & XHTML: with CSS & XHTML Authors: Elisabeth Freeman, Eric Freeman, Pages: 658, Published: 2005
Interactive TV Standards: A Guide to MHP, OCAP, and JavaTV Authors: Steven Morris, Anthony Smith-Chaigneau, Pages: 608, Published: 2005

Web:
How to Use Different CSS Style Sheets For Different Browsers (and ... How to selectively include/exclude CSS code from different browsers.
How to deal with CSS browser differences you will have different CSS files. The first file is the 'good' CSS, that is always ... A browser specific behavior. This is the least of your problems. ...
One giant list of CSS problems with different browsers Kinda like a giant reference card. one giant list of css problems with different browsers.
CSS Creator different browser CSS Problem - pls help Hi Everyone, I am making this site: http://rgweb.net84.net/testing/index.html In mozilla, box containing word "hi" is not aligned on left.
Query regarding CSS problem for different browsers - HTML / CSS Forum Query regarding CSS problem for different browsers. Get answers to your questions in our HTML / CSS Forum forum.
Introduction to Browser-Specific CSS Hacks [CSS Tutorials] It may seem strange at first to send different CSS rules to different versions of a browser, but in the case of IE5 it's very necessary. The problem lies in ...
No Margin For Error Why HTML renders differently in different browsers - “Why does my site look different in IE than in Firefox”? is a common question in CSS forums. ...
CSS problem with different browsers - Pixel2Life Forum Heh...well yeah, but everyone's crazy about CSS and all, and I figured it was layers they were talking about....I also saw something cool that I thought was ...
CSS hacks & browser detection Instead, the problem is that browsers can sometimes interpret CSS commands in different ways, causing developers to throw their arms up in the air and ...
CSS tutorial - Browser problems For old browsers, most CSS problems are noticed in Netscape 4. ... at least - the Mac version is very different, with very different problems). ...

Videos:
Twitter.com Hiring Front End Engineer Jobs Hiring Tube Apply: http://www.jobkite.com/post_info.asp?id=444910 Find More Jobs: http://www.JobKite.com www.Twitter.com Job Title: Front End Engineer Locatio...
Web Applications and the Ubiquitous Web Google TechTalks February 1, 2006 Dave Raggett Dave Raggett is currently a W3C Fellow from Canon, and W3C Activity Lead for Multimodal Interaction....
Michael Schwern - Perl is unDead yapcasia2008
Developing JavaScript with Chickenfoot Google TechTalks July 25, 2006 Rob Miller Michael Bolin ABSTRACT Chickenfoot is a Firefox extension that embeds a JavaScript programming environmen...
Literate functional testing Google London Test Automation Conference (LTAC) Google Tech Talks September 7th, 2006 Presenters: Robert Chatley and Tom White




Search This Site:










module mechanics tutorials (free)

setting up an sql connection

how can i retrieve who i am after logging in to my website?

sha1managed() not found

how can i automate the creation of default users in asp.net?

funny things going on...

how disable user.identety.name credential cache

xml file structure

regarding tree view

major major css overiding issue!!! please help

please help login variable sessions

have to explicitly add resources to project after conversion

login control => custom database => "remember me" does not validate user again?

does anyone know how to edit catalook?

[:'(] [help]webpart can't work in iis

forms authentication with active directory in multiple domains in asp.net 2.0 fails if one domain credential is incorrect

rss information for links doesn't seem to show up anywhere

forms authentication ---- how to make page expire?

page level control?

how to get data from textbox into the sql database table plz help...

menu selected item

error creating set and deployment

purgeeventlog

file security in dnn 3.2

dnn.com forums are busted...

windows authentication - child portals

modules missing from 3.1.1

.net studio 2005 with 1.1 framework?

hosting need of asp 2.0 and sql 2005

stopping windows authentication sometimes

 
All Times Are GMT