Graphic Design Forum and Web Design Forum

Compare Web Hosting


Go Back   Graphic Design Forum and Web Design Forum »Web Design Forum »CSS Forum

Notices

CSS Forum Cascading Style Sheets (CSS) and XHTML Forum


Reply
 
LinkBack (3) Thread Tools Display Modes
  3 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 12-09-2008, 06:42 PM
Junior Member
 
Join Date: May 2008
Gender: Male
Posts: 35
Default using css to position ul LI elements...list-style-image IE prob [solved]

Hi,
see Kinetic Healing - Home

Simple UL for the nav menu on the tabs on the page. I'm using poistion:relative with top:--- and left:--- to get the words to show up properly (still needs some fine tuning).

I tested with IE7 (vista) - the list-style images are off the the left, and in IE6 (win2k), they're off to the left, but break the flow of the page.

Desired effect is proper in FF3 (Fedora), Safari 3 (Tiger), FF3 (Tiger)

Code:
#nav {
  margin:0px;
  padding:0px;
  height:0px;
  display:inline;
  z-index:900;
}

#navHome {
    visibility: visible;
    width:10px;
    left: 348px;
    top: -48px;
    position: relative;
}

#navServ {
    visibility: visible;
    width:10px;
    left: 485px;
    position: relative;
    top: -94px;
}

#navtarot {
    text-align: center;
    visibility: visible;
    width:10px;
    left: 626px;
    position: relative;
    top: -149px;
}

#navCon {
    position:relative;
    visibility: visible;
    width:10px;
    left: 755px;
    top: -198px;
}

#nav ul li.navactive,#nav ul li.navactive a {
    text-align: center;
    background-repeat: no-repeat;
    background-position: center center;
    font-weight:bold;
    color: #337733;
}
#nav ul li.navactive{
    margin:0px;
    padding:0px;
    list-style-image: url(../img/li-lily.png);
    list-style-position: outside;
    
}
#nav ul li.navin, #nav ul li.navin a {
    list-style-type: none;
    text-align: center;
    color: #555;
}

#nav ul {
    width:895px;
    list-style-type: none;
    margin:0px;
    padding:0px;
    height:0px;
}
Code:
<div id="nav">
  <ul>
        <li class="navactive" id="navHome"> <a href="index.html">Home</a></li>
        <li class="navin" id="navServ"> <a href="services.html">Services</a></li>
        <li class="navin" id="navtarot"> <a href="tarot.html">Tarot Readings</a></li>
        <li class="navin" id="navCon"> <a href="contact.html">Contact</a></li>
    </ul>
Ideas? Also, the text for "Tarot Readings" isn't centering the way I assume it would.

[solution in later post at bottom]

Last edited by deschnell; 13-09-2008 at 11:58 PM. Reason: solved
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati Share This Article & VoteReddit! Wong this Post!Stumble this Post!RSS Share on FacebookForum Netvibes PageTwit this!
Reply With Quote

  #2 (permalink)  
Old 12-09-2008, 06:48 PM
jeffross's Avatar
Command Z aficionado
 
Join Date: Mar 2008
Location: Not Ramsbottom
Gender: Male
Posts: 1,397
Default

I'm not familiar with all the IE glitches and bugs, but I wonder if your results have anything to do with the box model hack?
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati Share This Article & VoteReddit! Wong this Post!Stumble this Post!RSS Share on FacebookForum Netvibes PageTwit this!
Reply With Quote
  #3 (permalink)  
Old 12-09-2008, 07:39 PM
Junior Member
 
Join Date: May 2008
Gender: Male
Posts: 35
Default

I had thought of that, but I'm not sure how that would directly be applied to the list image - as the element itself is positioned properly. It's as if the list-style-image location is not affected by the relative positioning scheme. How would I apply the box model hack in a case like this - and which elements would need it?
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati Share This Article & VoteReddit! Wong this Post!Stumble this Post!RSS Share on FacebookForum Netvibes PageTwit this!
Reply With Quote
  #4 (permalink)  
Old 12-09-2008, 07:45 PM
PR Design's Avatar
CSS Wizardry
 
Join Date: May 2007
Location: Leeds, England
Gender: Male
Posts: 12,845
Default

Everything's out in IE, the whole page. It's too awkward to deconstruct at the moment, but are you using a reset at all?
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati Share This Article & VoteReddit! Wong this Post!Stumble this Post!RSS Share on FacebookForum Netvibes PageTwit this!
Reply With Quote
  #5 (permalink)  
Old 12-09-2008, 08:07 PM
Junior Member
 
Join Date: May 2008
Gender: Male
Posts: 35
Default

reset?
here's the full css file:
Code:
body {

    padding: 0px;

    margin: auto;
  width:895px;
    background-position: center;
  font-family:verdana, helvetica, arial, sans-serif;
  font-size:.9em;
}
.access {
display:none;
}
#header {

    margin-top: 2em;
    
    margin-left: 0px;
    
    margin-bottom: 0px;
    
    margin-right: 0px;
    
    padding-left: 0px;
    
    padding-bottom: 0px;
    
    padding-right: 0px;
    
    padding-top: 0em;
    
    border-width: 0px;
    
    height: 325px;
    width:895px;
    float: none;
    
    visibility: visible;
    
    position: static;
    
    display: block;
    
    background-position: center top;
    
    background-repeat: no-repeat;
    
    background-image: url(../img/pageHead.jpg);
    
}

h1 { 
    margin-left:2em;

}

#content {

    padding-left: 0;

    padding-bottom: 0;

    padding-right: 0;

    padding-top: 25px;

    display: block;
    border-width: 0px;
    border-style: none; ;
    margin: 0;
    clear: both;
    position: relative;
    visibility: visible;
    background-position: center;
    background-repeat: repeat-y;
    background-image: url(../img/pageBack.gif);
    width:895px;
}
#deb_pic {
    margin-left:8em;
}
#title1 {
    margin-top:3px;
    margin-left:8em;
}
#services {
width:800px;
margin:0 auto;
}
#links {
width:800px;
margin:0 auto;
}
#about {
width:800px;
margin:0 auto;
}
dl {
  padding-top: 1em;
  padding-bottom:3em;
  margin-top: 1em;
  color:#336633;
  font-weight:bold;
  font-size:1.8em;

}
dt {
padding-top: 8px;
font-size:.7em;
color:#444;
line-height: 1.2em;
font-weight:normal;
}

dd {
color:#575;
line-height:1.3em;
font-weight:normal;
font-size:.55em;
}
p {
  
    padding: 0px;

    margin: 1em 2em;

}
dt img {
    margin:0 1em;
}
a {

}
a:active {

}

a:visited {

}

a:hover {

}
#nav {
  margin:0px;
  padding:0px;
  height:0px;
  display:inline;
  z-index:900;
}

#navHome {
    visibility: visible;
  width:10px;
    left: 348px;
    top: -48px;
    position: relative;
}

#navServ {
    visibility: visible;
  width:10px;
    left: 485px;
    position: relative;
  top: -94px;
}

#navtarot {
    text-align: center;
    visibility: visible;
  width:10px;
    left: 626px;
    position: relative;
  top: -149px;
}

#navCon {
  position:relative;
    visibility: visible;
  width:10px;
    left: 755px;
    top: -198px;
}

#nav ul li.navactive,#nav ul li.navactive a {
    text-align: center;
    background-repeat: no-repeat;

    
    background-position: center center;
  font-weight:bold;
    color: #337733;
}
#nav ul li.navactive{
    margin:0px;
    padding:0px;
    list-style-image: url(../img/li-lily.png);
    list-style-position: outside;
    
}
#nav ul li.navin, #nav ul li.navin a {
  list-style-type: none;
  text-align: center;
    color: #555;
}

#nav ul {
  width:895px;
    list-style-type: none;
    margin:0px;
    padding:0px;
    height:0px;
}
p.quote {
    width:70%;
    font-style:italic;
    text-align:center;
    margin:0 auto;
}

#footer p {
    text-align: center;
    background-position: center;
    position: relative;
    clear: both;
    color: #999999;
    padding: 0px;
}

#footer {

    height: 27px;
    padding: 0px;
    margin: 0px;
    margin-bottom:1em;
  border-style: none;
    background-position: center;
    background-repeat: no-repeat;
    background-image: url(../img/pageBottom.gif);
}
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati Share This Article & VoteReddit! Wong this Post!Stumble this Post!RSS Share on FacebookForum Netvibes PageTwit this!
Reply With Quote
  #6 (permalink)  
Old 12-09-2008, 08:14 PM
PR Design's Avatar
CSS Wizardry
 
Join Date: May 2007
Location: Leeds, England
Gender: Male
Posts: 12,845
Default

Ah, right. By putting this at the top of every new project's CSS file you should be able to make this more cross browser compatible much more easily:

Code:
/*YAHOO! RESET*/
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td {  
	margin:0; 
	padding:0; 
} 
table { 
	border-collapse:collapse; 
	border-spacing:0; 
} 
fieldset,img {  
	border:0; 
} 
address,caption,cite,code,em,strong,dfn,th,var { 
	font-style:normal; 
	font-weight:normal; 
} 
ol,ul { 
	list-style:none; 
} 
caption,th { 
	text-align:left; 
} 
h1,h2,h3,h4,h5,h6 { 
	font-size:100%; 
	font-weight:normal; 
} 
q:before,q:after { 
	content:''; 
} 
abbr,acronym {
	border:0; 
}
/*---------- END RESET ----------*/
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati Share This Article & VoteReddit! Wong this Post!Stumble this Post!RSS Share on FacebookForum Netvibes PageTwit this!
Reply With Quote
  #7 (permalink)  
Old 12-09-2008, 08:30 PM
Junior Member
 
Join Date: May 2008
Gender: Male
Posts: 35
Default

ok, reset added to CSS. No changes.
what do you mean by the whole page being out in IE? I don't see any problems other than the one with the list-image? I haven't even started working on the footer...it's just there in limbo for now.
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati Share This Article & VoteReddit! Wong this Post!Stumble this Post!RSS Share on FacebookForum Netvibes PageTwit this!
Reply With Quote
  #8 (permalink)  
Old 12-09-2008, 10:27 PM
bartoszdesign's Avatar
Established Member
 
Join Date: Aug 2008
Location: The Netherlands
Gender: Male
Posts: 487
Default

no that's really strange. when you open the link in ie7 it looks like this



then refreshing it it will jump back in position.

i would recommend to put everything in a centred wrapper to get this fixed and start from there on.
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati Share This Article & VoteReddit! Wong this Post!Stumble this Post!RSS Share on FacebookForum Netvibes PageTwit this!
Reply With Quote
  #9 (permalink)  
Old 13-09-2008, 11:55 PM
Junior Member
 
Join Date: May 2008
Gender: Male
Posts: 35
Default solution

Well if anyone wants to check this and confirm, but I think I've got all problems solved. The main problem was that I had a width specified for each LI #, rather than for the UL # - when I moved this property, the list image snaps to where it should be.

There was still a large gap in IE6 where the list normally would have resided - so I used a conditional comment for IE6 to bring up the main content...more of a workaround than understanding the problem...time is always an issue.

Thanks for any helpers along the way.
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati Share This Article & VoteReddit! Wong this Post!Stumble this Post!RSS Share on FacebookForum Netvibes PageTwit this!
Reply With Quote
  #10 (permalink)  
Old 16-09-2008, 04:37 PM
likethegoddess's Avatar
Idiosyncratic Member ;)
 
Join Date: May 2008
Location: San Francisco, Calif.
Gender: Female
Posts: 693
Default

I'm still getting the behavior that bartoszdesign got in IE7.
____________________________

likethegoddess design for musicians and non-profits
Twitter | RSS | Google Reader | Facebook | Flickr | Pandora | Last.fm
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati Share This Article & VoteReddit! Wong this Post!Stumble this Post!RSS Share on FacebookForum Netvibes PageTwit this!
Reply With Quote
Reply


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
Breaking Down a Child-like Style into the Elements of Design Graphic Design Blog Graphic Design Blog 0 23-07-2008 02:00 PM
Monitor Related Prob d3niss3 Off Topic 3 11-07-2008 09:20 PM
Problems with CSS position. Skoven CSS Forum 5 17-06-2008 08:09 PM
Apple TV style Flash Image Scroller lolly Flash Forum 1 25-04-2008 06:33 PM
CSS List background image bullets - Cross browser problem bradgreens CSS Forum 8 30-11-2007 10:54 AM



The Graphics Forum Web Design Stuff Free Decent Downloads Free Quality Wallpapers Graphics Forum
Free Vista Themes Creativecurio - Design Blog Graphic Design Advertising Graphic Design Advertising
The Top The Best Images Heavenly Glimpses Photography Tech Talk 247 Logo Design - $149 Affordable Stock Vector Illustrations
Free Design Portfolios

Create your own custom 2010 Calendars

Web Hosting - UK Web Hosting services for business or personal website hosting needs.

Dedicated Servers - A full range of Managed Dedicated Server solutions suitable for all your requirements.

Graphic Design Blog | Web Design Forum | Graphic Design and Print Forum | Graphic Design Links | Advertise On This Site

Web Design UK | Design by Miner Skinz.com | Logo Design UK | Art Schools Online | Pressure Seal Printing | Vision.To Design

Colour Print | Graphic Design UK | Logo Design | Photography Blog | Brochure Design UK | Design Forum Links | Logo Design

Graphic Design Schools Online | Integrated Cards | Integrated Labels | Graphic Design | Logo Design | Graphic Design Social Network

Logo Design | Integrated Cards & Labels | Graphic Design Tutorials | Logo Designer | UK Logo Design Studio

Colour Printers, Web Design and Logo Design UK | Business Cards | Accident and Injury Claims Rotherham UK | Logo Design Blog

Funfair Hire, Carousel Hire, Carnival Hire in the UK | Web Designer Rotherham, Yorkshire, UK | Damp Proofing & Plastering, Dartford, Kent

Damp Proofing, Refurbishment & Plastering, London | Wedding Photography London, Wedding Photographer, Kent

Free Dating in Sheffield | Free Dating in Sheffield and Yorkshire Forum | Motorhome Rental and RV Hire Scotland | Vector Art Blog

Free Web Hosting | Custom Logo Design - $149 Only | Affordable Print Design Templates | Small Business Logo Design | Company Logo Design

Logo Design Service | Logo Design Firm | Logo Design Reseller | Custom Logo Design | Letterhead Printing | Flyer Printing | Business Card Printing

All times are GMT. The time now is 05:33 AM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 Estetica Design Forum's Privacy Policy