/    Sign up×
Community /Pin to ProfileBookmark

IE ignoring clear : both ?

Hello, all. On my site (which I’m hosting on my own computer for now) I’m having an issue in which IE is ignoring clear: both, and floating the sidebar navigation next to the main navigation, and as a result stretching out the entire wrapper div, throwing off the whole layout. If I use float: none on the sidebar, then the problem goes away somewhat; it moves next to the content div where its supposed to be, but it isnt ‘pixel perfect’ anymore.

Currently I’m torn between not linking to the CSS if the user is using IE, redirecting the user to the Firefox homepage if using IE, or fixing it. The last is the best, but I can’t figure out the best solution, so… *sigh* Thanks in advance.

Link (for today, will update it): [url]http://141.154.68.252:81/[/url]
CSS file: [url]http://141.154.68.252:81/bg/css/screen/[/url] (indented and commented, main layout code at top)

to post a comment
CSS

2 Comments(s)

Copy linkTweet thisAlerts:
@David_HarrisonAug 15.2004 — Try removing the clear: right; from the #links styles.
Copy linkTweet thisAlerts:
@Ben_RogersauthorAug 15.2004 — Well, yes, like I said float: none works to a limit, but there's no better way? That's all I wanted to know. I'd rather not use messy browser sniffing if I can help it, but, if I do, then I will. Well, by adding left positioning everything is in its right place... but I feel so unclean. :p

For the search, in case noone has a better way:
[code=php]<?php
$browser = $_SERVER['HTTP_USER_AGENT'];
$opera = (stristr($browser, 'Opera') !== false);
$mozilla = (stristr($browser, 'Mozilla') !== false && stristr($browser, 'MSIE') === false);
$ie = (stristr($browser, 'MSIE') !== false && stristr($browser, 'Opera') === false);
if ($ie) : ?>
#body {left: -1px;}
#header {left: 4px;}
#links {float: none; left: 12px;}
<?php endif; ?>[/code]

(That's Paul Jr.'s sniffer btw)
×

Success!

Help @Ben_Rogers spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.13,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...