iEntry 10th Anniversary Forum Rules Search
WebProWorld
Register FAQ Calendar Mark Forums Read
Graphics & Design Discussion Forum Post your graphics design questions/comments/ideas in here. Ask questions, post tutorials, discuss trends and best practices. Sub-forum for website accessibility and usability.

Share Thread: & Tags

Share Thread:

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-04-2008, 01:44 PM
WebProWorld New Member
 
Join Date: Oct 2006
Location: France
Posts: 9
benandal RepRank 0
Default CSS Problem with IE

I am currently constructing a new website and am having some issues with IE. In Firefox on PC, Safari/Firefox on a Mac the h1 tag displays perfectly with 'WEDDINGS CATERING' all on one line, but in IE it is splitting the h1 and h1subheading onto two lines

http://www.imaginez-cannes.com/demo/..._catering.html

Any ideas what I'm doing wrong of how to get around it?

Many thanks
Ben
Reply With Quote
  #2 (permalink)  
Old 12-04-2008, 01:54 PM
wige's Avatar
Moderator
WebProWorld Moderator
 
Join Date: Jun 2006
Location: United States
Posts: 2,648
wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9
Default Re: CSS Problem with IE

You can try taking out the margin or padding, see if that fixes the issue. Otherwise, try specifying the class as an inline element. I think that when you specify a margin/padding for an element, IE will default that element to block. Since you are just modifying the font size, let it inherit the margin/padding from the h1 element. Then if you still need to space it properly, use padding-left.
__________________
The best way to learn anything, is to question everything.

Last edited by wige; 12-04-2008 at 01:56 PM.
Reply With Quote
  #3 (permalink)  
Old 12-04-2008, 01:56 PM
WebProWorld New Member
 
Join Date: Dec 2008
Location: Cannes, France
Posts: 10
Website Design France RepRank 0
Default Re: CSS Problem with IE

Do you mean to the h1 or .h1subheading?
Reply With Quote
  #4 (permalink)  
Old 12-04-2008, 02:00 PM
WebProWorld New Member
 
Join Date: Dec 2008
Location: Cannes, France
Posts: 10
Website Design France RepRank 0
Default Re: CSS Problem with IE

Hmmm, I deleted it from both and then added the needed margin: 0; to avoid the big gaps that appeared - still no luck.
Reply With Quote
  #5 (permalink)  
Old 12-04-2008, 02:05 PM
WebProWorld New Member
 
Join Date: Dec 2008
Location: Cannes, France
Posts: 10
Website Design France RepRank 0
Default Re: CSS Problem with IE

OK, changed the css to:

h1 {
margin: 0;
font-family: Arial, Helvetica, sans-serif;
color: #FF6633;
font-size: 20px;
display: inline;
}

.h1subheading {
font-family: Arial, Helvetica, sans-serif;
color: #FFFFFF;
font-size: 11px;
}

but it still doesn't look right in IE
Reply With Quote
  #6 (permalink)  
Old 12-04-2008, 02:08 PM
WebProWorld New Member
 
Join Date: Dec 2008
Location: Cannes, France
Posts: 10
Website Design France RepRank 0
Default Re: CSS Problem with IE

by the way, thank you very much for your advice on this - it is one issue I have - debugging sites to work across all platforms...drives me insane!!!
Reply With Quote
  #7 (permalink)  
Old 12-04-2008, 02:43 PM
WebProWorld Member
 
Join Date: Feb 2004
Location: New York
Posts: 82
JSeverson RepRank 0
Default Re: CSS Problem with IE

Hi,
Try the following. I only tested it in Firefox and IE 6 but it seemed to work fine. If it works in IE 7, just move the inline styles to your style sheet.

<h1 style="float:left">WEDDINGS </h1>
<h2 style="float:left; margin:0px; padding-top:8px; padding-left:2px;">CATERING</h2>
__________________
Jeff T. Severson
J.T.S. Design, Inc.
Reply With Quote
  #8 (permalink)  
Old 12-04-2008, 04:08 PM
WebProWorld New Member
 
Join Date: Dec 2008
Location: Cannes, France
Posts: 10
Website Design France RepRank 0
Default Re: CSS Problem with IE

Brilliant, works a treat although Safari now has slight issues but I can live with that!
Thanks very much Jeff for your help and advice....and also to wige

Ben
Reply With Quote
  #9 (permalink)  
Old 12-05-2008, 06:20 PM
MikeDF's Avatar
WebProWorld New Member
 
Join Date: Jan 2004
Location: UK
Posts: 22
MikeDF RepRank 0
Default Re: CSS Problem with IE

I have taken to using something like the following for things like this:

WEDDINGS <span class="small">CATERING</span>

CSS as follows (whatever size you like then):
.small
{
font-size: 0.8em;
}
Seems to work fine....
__________________
Mike Finding
http://www.healthyhomesclub.co.uk/MD
Reply With Quote
  #10 (permalink)  
Old 12-05-2008, 10:21 PM
BluePlanet's Avatar
WebProWorld New Member
 
Join Date: Nov 2008
Posts: 23
BluePlanet RepRank 1
Default Re: CSS Problem with IE

A small thing but "WEDDINGS" should not be pluralized. It should just be "WEDDING CATERING".

Using the wrong tense or worse changing the tense within a sentence really shows a lack of English understanding and will not help your sales pitch.
Reply With Quote
  #11 (permalink)  
Old 12-06-2008, 01:35 AM
Moderator
WebProWorld Moderator
 
Join Date: Oct 2003
Location: Alberta, Canada
Posts: 878
weegillis RepRank 6weegillis RepRank 6weegillis RepRank 6weegillis RepRank 6weegillis RepRank 6weegillis RepRank 6weegillis RepRank 6
Default Re: CSS Problem with IE

HTML Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="language" content="en" />
<title>Lining up odd sizes inline</title>
<style type="text/css">
#eg_1 h1,
#eg_1 h2,
#eg_2 h1 {
 display:inline;
 text-align:baseline;
}
#eg_2 h1 span {
 font-size:0.75em;
}
</style>
</head>

<body>
<div id="eg_1">
<h1>WEDDINGS </h1>
<h2> CATERING</h2>
</div>
<div id="eg_2">
<h1>WEDDINGS
<span>CATERING</span></h1>
</div>
</body>
</html>
BASELINE seems to line them up.

In eg_1 the title hierarchy is iffy.

eg_2 maintains association and title level integrity and avoids additional structure. I'd go with what you had in mind originally. The span will inherit the alignment of its parent element, the h1, so will share the same baseline.

Notice that the h1 is contained in a div, to retain block level status in the document flow.

Last edited by weegillis; 12-06-2008 at 01:47 AM. Reason: additional info and corrections
Reply With Quote
  #12 (permalink)  
Old 01-06-2009, 12:06 PM
WebProWorld New Member
 
Join Date: Dec 2008
Location: Cannes, France
Posts: 10
Website Design France RepRank 0
Default Re: CSS Problem with IE

Happy New Year everyone!

I am back into work this morning and have an email from this client asking for all instances of the company name to go orange. But this has caused weird results in IE on PC.

As I don't have enough posts as yet I am not able to paste the hyperlink so use the link above, delete 'demo' and paste in /about_imaginez_cannes.(html)

The orange Imaginez word seems to be jumping down and appearing in the middle of two other words.
It SHOULD read: the Imaginez signature of inspirational ideas
It reads in IE: the signature of Imaginez inspirational ideas

Any ideas? I've tried adding and removing margin and padding but no success....

Ben
Reply With Quote
  #13 (permalink)  
Old 01-06-2009, 04:28 PM
WebProWorld Member
 
Join Date: Feb 2005
Posts: 36
dmwcons RepRank 0
Default Re: CSS Problem with IE

Might be worth looking at the errors reported by W3C markup validation.

Regards, David.
Reply With Quote
  #14 (permalink)  
Old 01-06-2009, 04:30 PM
WebProWorld New Member
 
Join Date: Dec 2008
Location: Cannes, France
Posts: 10
Website Design France RepRank 0
Default Re: CSS Problem with IE

ok, i'll have a look...thanks David.
Reply With Quote
  #15 (permalink)  
Old 01-07-2009, 02:29 PM
WebProWorld New Member
 
Join Date: Dec 2008
Location: Cannes, France
Posts: 10
Website Design France RepRank 0
Default Re: CSS Problem with IE

I have managed to figure out a few of the errors in my html (which I am in the process of fixing) but the following has stumped me:

Line 14, Column 88: document type does not allow element "h1" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag.
…"></a> <span class="display-none"><h1>Imaginez Cannes - Creative Food and Par

The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").

I've tried tweaking bits but still can't get to the bottom of it... please help!!!
Reply With Quote
  #16 (permalink)  
Old 01-08-2009, 12:17 AM
WebProWorld Member
 
Join Date: Oct 2006
Location: Chicago
Posts: 27
holyinsomniac RepRank 0
Default Re: CSS Problem with IE

Benandal,

I feel your pain because making your site work across platform is a challenge on its own. I found this tool very useful.

Check Browser Compatibility, Cross Platform Browser Test - Browsershots

Check it out. Good luck!
__________________
HolyInsomniac - Webmaster - The Daily Savings - LinkCity Pro
Go to http://thedailysavings.com or http://linkcitypro.com
Reply With Quote
  #17 (permalink)  
Old 01-08-2009, 09:31 AM
WebProWorld New Member
 
Join Date: Dec 2008
Location: Cannes, France
Posts: 10
Website Design France RepRank 0
Default Re: CSS Problem with IE

Thats a great tool - just added the site to the queue so hopefully will get some results - i've ALWAYS had problems trying to debug cross browser, I don't know where to start if I am to be honest.

Has anyone any idea why I keep getting this error:

Line 14, Column 88: document type does not allow element "h1" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag.

<div id="logo"><span class="display-none"><h1>Imaginez Cannes are a wedding planning company, organising weddings at venues in Monaco.</h1></span></div>
Reply With Quote
  #18 (permalink)  
Old 01-09-2009, 01:23 PM
WebProWorld Member
 
Join Date: Feb 2004
Location: New York
Posts: 82
JSeverson RepRank 0
Default Re: CSS Problem with IE

Quote:
Originally Posted by Website Design France View Post
<div id="logo"><span class="display-none"><h1>Imaginez Cannes are a wedding planning company, organising weddings at venues in Monaco.</h1></span></div>
Try switching the span and h1 tags around. The span tag is an inline element and you are trying to wrap it around a block-level element.

<div id="logo"><h1><span class="display-none">Imaginez Cannes are a wedding planning company, organising weddings at venues in Monaco.</span></h1></div>

Is there any reason why you can't just apply the display-none class directly to the h1 tag and get rid of the span tag altogether?
__________________
Jeff T. Severson
J.T.S. Design, Inc.
Reply With Quote
  #19 (permalink)  
Old 01-09-2009, 01:58 PM
WebProWorld New Member
 
Join Date: Dec 2008
Location: Cannes, France
Posts: 10
Website Design France RepRank 0
Default Re: CSS Problem with IE

That works a treat - I did:

<div id="column3-about"><h2 class="display-none">Imaginez Cannes - Creative Food and Party Design</h2>

Brilliant - thanks!

Ben
Reply With Quote
Reply

  WebProWorld > Site Design > Graphics & Design Discussion Forum

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
CSS Problem dwrightcwf Web Programming Discussion Forum 2 05-10-2007 05:08 PM
CSS Problem in IE6 richkoi Web Programming Discussion Forum 2 05-07-2007 02:47 PM
Another IE/CSS div problem I am sure someone here can fix. MeanSEO Graphics & Design Discussion Forum 19 07-27-2006 10:29 PM
Problem 301- 302 ryanforbes Google Discussion Forum 7 04-13-2006 06:42 AM
CSS Problem MrLeN Web Programming Discussion Forum 8 01-06-2004 01:58 PM


All times are GMT -4. The time now is 11:31 PM.



Search Engine Optimization by vBSEO 3.3.0