/    Sign up×
Community /Pin to ProfileBookmark

Initial broken layout, refresh fixes it (IE)

hi there, I’ve designed a simple site with the navigation sitting in a small column on the left and the main content on the right. Each is in its own <div> and then floated to get the two columns.

All seems to be working in Firefox and the latest NN, but it breaks in IE and also Opera. Curiously, the first time you view the page in IE, the body content is beneath the navigation column, rather than alongside it. In IE clicking refresh corrects the problem, and then even clearing the cache doesn’t cause the problem to reappear when refreshed again.
In Opera, it doesn’t get fixed at all.

Does anyone know what might be causing this? I’ve read that defining the width of a block alongside a float can cause problems – will it be something to do with this?

I’d *really* appreciate any help on this
thanks,

Essentially everything in the page is contained with:
.holder {
position: absolute;
top: 60px;
}

and the main right column is contained within:
.body_content {
margin-top: 30px;
width: 500px;
float: left;
position: relative;
}

and the left hand column is in:
.buttons {
float: left;
position: relative;
width: 193px;
}

to post a comment
CSS

8 Comments(s)

Copy linkTweet thisAlerts:
@DaveSWOct 22.2004 — You have three options:

1) try one of the example layouts from some of the css sites like http://www.bluerobot.com/web/layouts/ or just google 2 column css layout.

2)paste the entire page code in

3) link to it.

I'm not sure what you want your code to do... ?

Press 1 to phone a friend, 2 for a 50-50 choice or any key to quit...
Copy linkTweet thisAlerts:
@LittleRedauthorOct 22.2004 — sorry - here's a link to the page www.salmacis.co.uk/leesroxburgh/ - I'll have a look at the bluerobot site shortly
Copy linkTweet thisAlerts:
@DaveSWOct 22.2004 — ok change of design thought process for you:

For the menu, have:

float: left;

width: [whatever]px;

for the content:

margin-left: [whatever]px

where [whatever] is the same dimension, or slightly larger if you want a margin.

Also I'd suggest css for the menu, but I can't knock that up as an example from uni (lack of software!).

Maybe I'll look into it when I get home.
Copy linkTweet thisAlerts:
@LittleRedauthorOct 22.2004 — great stuff - thanks!
Copy linkTweet thisAlerts:
@rsdOct 22.2004 — I would take out the <div class="holder"> altogether. It's giving an absolute position to something that would be there anyway.

The body_content does not need to be floated left. Just float the buttons left and the body will automatically pull up to the right of the buttons. Setting the width of the body_content may be what's causing it to drop below the button section. If you take out the width then the design would be more fluid. It would expand and contract with the browser window without dropping the body below the buttons.
Copy linkTweet thisAlerts:
@DaveSWOct 22.2004 — or just put a margin-top on the .holder, instead of positioning.
Copy linkTweet thisAlerts:
@LittleRedauthorOct 23.2004 — thanks for your help - that's fixed it!
Copy linkTweet thisAlerts:
@DaveSWOct 23.2004 — np

Nice site design btw. only things bugging me are the space to the left of the menu and the way you have some industrial photos at the top of the recent projects page - maybe rearrange the order?
×

Success!

Help @LittleRed 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 6.17,
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: @nearjob,
tipped: article
amount: 1000 SATS,

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

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...