February 19, 201610 yr http://concretepokerrepair.co.uk/nav-test.php No idea where this has come from; Firebug says it's only getting: h1 { margin-bock-end: 0.67em; margin-block-start: 0.67em;} In my css it has: .wrap-right {float:left; margin:-130px 0 0 37.5%; padding:0;} It's picking a massive unexpected margin or padding to the top and I've got no idea where it's coming from? See Concrete Staircase Specialists halfway down the page. I want to wrap around the slider at a certain width then I'll drop this down below when it's narrow on mobiles. I've used rems, ems, tried resetting the h1 and body element; NOTHING! Firebug is nowhere near as handy as it used to be; I can't remember the last CSS thing I corrected in Firebug; think it's almost obsolete with JS. Anyway thanks guys, sorry for such a silly question and having to ask it!
February 19, 201610 yr Author LOL yeah I knew I was in for a telling off with my IDs, thanks Nock. I have a basic browser reset in line 2, ahem I mean line 1 as I now removed my Charset UTF-8 tag: * html, body, ul, p, h1, h2, h3, h4, h5, h6, a {padding:0; margin:0; text-decoration:none; color:black; font-family:"Arial Black, Gadget, sans-serif"; font-family:"Arial Black, Gadget, sans-serif";} I quickly entered a browser reset from a Google search prior to posting but it brought me no joy, but thanks for mentioning this as surely that's the only thing causing it. I remember Niller recommended one to me so I'm going to put that in. Thanks again for your input Nock. Edit: Yes I tried a clearfix hack and this reset rule and both together but no joy. Edited February 19, 201610 yr by Precise Formwork
February 19, 201610 yr I won't mention the ID's but I will mention the magic numbers, where have those odd numbers come from in your margins?For some context on what magic numbers are and why they're bad http://csswizardry.com/2012/11/code-smells-in-css/#magic-numbers
February 19, 201610 yr Author Thanks Nock, if you resize the width of the browser h1 jumps up and down; it must be caused by some sort of nesting issue or something. Rob thanks, I've got the top margin set with a fixed value just temporarily until I fix this. I was planning to use rems but I just removed incase this was causing some sort of issue. Edit: I have to use a negative margin on the top to get it to float around the nivoslider. Edited February 19, 201610 yr by Precise Formwork
February 19, 201610 yr Thanks Nock, if you resize the width of the browser h1 jumps up and down; it must be caused by some sort of nesting issue or something. Rob thanks, I've got the top margin set with a fixed value just temporarily until I fix this. I was planning to use rems but I just removed incase this was causing some sort of issue. Edit: I have to use a negative margin on the top to get it to float around the nivoslider. Being set in REMs makes no difference it's weather the number is circumstantial or not, if it's temporary then that's fine. Occasionally the are unavoidable in which case you comment what the number means for future reference / use a Sass variable. Must in most cases magic numbers can be removed when things are well structured.
February 19, 201610 yr Author Thanks Rob, yeah I thought I'd just change it incase. I know that rems are specifically designed not to compound measurement but I thought I'd try it just incase the designer of rems had made a mistake and not me lol. Edited February 19, 201610 yr by Precise Formwork
February 20, 201610 yr Author Thanks Nock, I know it should be simple right; no such joy. The slider (take this with a pinch of salt as it's a nivoslider) is positioned in the main css as so and sits on the left and it positions itself where one would expect it to be: .nivoSlider {position:relative; width:35%; height:auto; overflow: hidden;} .nivoSlider img {position:absolute; top:0px; left:0px; max-width: none; } .nivo-main-image {display: block !important;position: relative !important; width: 100% !important;} Now here's where things get insane. If you just put a normal <p> in, or my .wrap-right it clears this slideshow and positions itself underneath the slider. To overcome this I put a negative margin on the top. It's not ideal; really I would want the .wrap-right to wrap around the slider with a bit of a space so it's not too cluttered. However the only way to do it and it seems to be to positing another container adjacent to the slider. .wrap-right {float:left; margin:-23rem 0 0 37.5%; padding:0; width:60%; position:relative; display:inline-block; vertical-align:top;} The problem is as you resize the width the .wrap-right goes too high. It ignores the previous elements and goes as high as it wants, which seems peculiar. I tried a spacer with clear: both; but no joy either. Thanks again.
February 20, 201610 yr Author Thanks for the codepen Nock, very kind of you to go through all that effort. The effect construed in the codepen is desired, however the slider seems to be having strange effects and normal css does not seem to be working. Nivoslider uses an ID presumably because it assigns a class also to that ID and with all the complex CSS3 and JS going on. .wrapper {display:inline-block; width:100%; white-space:nowrap;} .wrap-right {float:left; margin:-23rem 0 0 37.5%; padding:0; width:60%; position:relative; display:inline-block; vertical-align:top; white-space:normal;} I've got my CSS as above but I think the slider is causing problems as presumably to get the slider to function it's using several different positions etc... Here's a movie quickly explaining the problem.
February 20, 201610 yr Author Thanks Nock, I've done as suggested and I there's something in your CSS messing with the slideshow; on the last slide it closes up. The wrap-right is not wrapping around the wrap-left either. I've checked my html to ensure I don't have any unclosed tags as I thought I hadn't closed a div properly. Here is live with your CSS: And here is with my CSS.
February 20, 201610 yr Author Thanks for your patience and perseverance Nock, greatly appreciated. Ok I'm on it again. I offered £15 to solve this problem on another post. If you send me a paypal invoice to receipts@preciseformwork.co.uk I'd be more than happy to wire this money for your kind help on this.
February 20, 201610 yr Author Cool, well massive thanks. I haven't managed to get it to work yet but I'm obviously doing something stupid lol.
February 20, 201610 yr Author Thanks Nock, I'm going boss-eyed. It's embarassing how much I'm struggling with this. It's not like I'm not putting the hours in. I've managed to get them both 50% here but I'm loosing an image on the slideshow. Then on the other page I've got the slideshow working fine but not the layout. I'm going to walk away from it for an hour or I think I'm going to have a breakdown. It's concerning how I'm struggling with this. I think I've wasted so much time checking indentation and where my code nests using Dreamweaver. I watched a couple of quick tutorials in the background on Sublime Text 2, do you think I should upgrade now or will this just complicate things further as I've got quite a lot on my plate at the minute. However taking 2 months to produce this page is embarassing!
February 21, 201610 yr Author Nock I'm so grateful for your perseverance on this and your patience with me on this one; massive thanks. If there's anything I can do, possibly a recommendation on Linked-In or something like that? Thanks again Nock.
Create an account or sign in to comment