Jump to content

Recommended Posts

Ello.

 

I have a gap that looks no bigger than 1px wide in between two divs(a nav bar runing across the top of the screen) I've started to learn css, usong two divs both at 50% one floated left, the pther to the roght, one has a hover menu the otehr a php inc checkuserlog.

 

I was advs to change the doctype and inclue a reset css.  Have done both but still that irritating gap is still there.  its only when the screen is resized to certain widths as well.  if you resize slowly you can see it 'popping' in and out.

 

Any suggestions.  I've prob designed the menu wrong and should maybe just use one div, but if i wanted 2, how would i solve this?

Link to comment
https://forums.phpfreaks.com/topic/233516-1px-gap-inbetween-two-divs/
Share on other sites

odd, it showed up on the oc's where i study too.  they use ie, not sure of version.  not the most recent thats fir sure, doubt they've been upgraded for a  while.

 

I've tested on chrome, newest release.

 

I mainly use firefox and it looks fine. 

 

 

 

 

 

[attachment deleted by admin]

well it could be that bthey use IE7 or even worse. in that case, you can try to give the div a width of 49.5% or something.

If you use float left on both nooone wil notice. but use conditional comments for this so all decent browser don't get affected.

if your experimenting, clean the lab, and ditch all tables. you clear and floats for your framework. or us ea grid system to do that for you. th yui or 960grid seems to be very nice if you want a out of the box solution.

yup, have created a new folder that I'm experimenting in, just divs and no tables. 

I had a look at that 960, looks good but I think I'd rather do it myself and lern the hard way, otherwise all i'l learn is how to use a website, I did test it though just to see the code that was output.  was interesting.

Well, if you looked at it you can see the logic, in the grid system. efficiency and an understandable framework is the key.

You don't have to use it of course, but ones you see what they do you understand that most layouts can bee achieved with just some floats and clears.

You're right of course, the logic there is clear, but...its looks a little over the top.  might just be the way they've seperated everything or maybe I'm looking at it comopleley wrong but it looks like theres ..too much.

 

I thought...you'd have each of the containers so to speaker, header, menu content etc and then within them the other containers and then they would have the apdding and so on.

This seems to have everythign seperate but maybe it's liek that to make it easier to read...although theres a fair bit of it. 1529 lines for the css (minus a few for extra lines)

 

I like that other tutorial more, the layout for that makes more sense to me.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.