| Home | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
|
|
#1 (permalink) |
|
dilaudid
|
IE cock up
http://www.2605.co.uk/ In Firefox, it displays exactly as i want it to, with the links one beneath the other with hardly any leading. In internet explorer, the links are all spaced out. Any ideas how to rectify? I'm a chutney farmer
|
|
|
|
|
|
#2 (permalink) | |
|
I Ain't Losing Any Sleep™
Join Date: Apr 2003
Posts: 5,208
|
Quote:
fuck me, is that the answer to all lifes little mysteries this week? did you actually look at the code or just take a stab at it? Pat, it's <br /> not </br> headings (h2, h3 etc) are block elements so don't need a line break to start a new line. you might want to also think about using a list to display your list of links. <ul> <li><a href="#">whatever 1</a></li> <li><a href="#">whatever 2</a></li> <li><a href="#">blah blah</a></li> <li><a href="#">fucking blah</a></li> </ul> If you don't want the bullets.... ul { list-style: none; } or just carry on regardless. |
|
|
|
|
#3 (permalink) |
|
dilaudid
|
That's top mate, cheers. I've lost my Web Standards solutions book so i'm feeling a bit lost. If you have a look now, it's sticking the links over to the right - i've tried ading align:left; and padding-left: 0px; to both li and li a in my css, but that's not working. I'm a chutney farmer
|
|
|
|
#4 (permalink) |
|
Senior Member
Join Date: Jan 2005
Posts: 12,334
|
I've noticed when using lists sometimes IE spaces out the <li>s in an odd way. Try fudging the line-heights - 1em or .5em seem to do wonders for me. Sometimes, it's been a matter of margin-top: -3px; or something. It's my practice to put all these "fixes" (even if they're not "hacks" per say) into an IE6 and lower stylesheet via conditional comments - <!--[if lte IE 6]><link blah blah /><[endif]--> - pretty sure I got the syntax down. |
|
|
|
#5 (permalink) | |
|
I Ain't Losing Any Sleep™
Join Date: Apr 2003
Posts: 5,208
|
I've noticed a recurring theme recently where answers posted don't seem to be answering the questions asked. very odd. Pat, In IE unordered lists (ul) are given default left padding. In FF they are given default left margin. that's why it's "sticking the links over to the right". There's lots of default values that you have to get used to. Headings (h1, h2 etc) are given default bottom margins in most browsers. I think in FF they're also given default top margins. confused yet? The best thing to do is to reset all these defaults to zero before you start. Most people will tell you to do what sheepy does and reset everything using a *. example... Code:
but for a beginner I'd recommend actually writing the individual inconsistent elements out in full, that way you know which ones we're talking about and which ones are being reset. Stick this at the top of you stylesheet. Code:
use some/all of those in you page with and without the style attached and see the differences across browsers. what's the saying? Learn the rules so you know how to break them properly. I'm coming over all hippy now. Quote:
|
|
|
|
|
#6 (permalink) | ||
|
Dr. Lucien Sanchez
Join Date: Mar 2003
Location: UK
Posts: 5,602
|
Quote:
If you want to take the indent out of the links, you can use that or: Quote:
|
||
|
|
|
#7 (permalink) | |
|
I Ain't Losing Any Sleep™
Join Date: Apr 2003
Posts: 5,208
|
Quote:
but it wouldn't when pat's code look like Code:
|
|
|
|
|
#10 (permalink) |
|
dilaudid
|
thanks largely beers. All sorted i think, http://www.2605.co.uk/ I'm a chutney farmer
|
|
![]() |
|