CSS properties out of whack when adding button - html

I have my page set up the way I want but when I try to add a button beneath the image on the left side of the page everything go a little crazy. I've been struggling with this for a little while not sure what to try next
Here's a visual:
http://jsfiddle.net/xFD8q/10/
Thanks

Revise your HTML, mixing DIVS with Tables isn't usually the best idea.
If you're unsure that your HTML is valid you can validate it via W3C Markup Validation found here
I made a fiddle with a revised markup but left the refactoring of the CSS to you.
The fiddle has inline CSS which is not recommended but it was the fastest way to do it! :)
Here's the fiddle
Good luck! :D

Related

Space between two things on website

I'm kinda new to coding in html and css so I really need help.
I was wondering how i could make space between two things
like this: http://prntscr.com/6vo7lz
in this http://prntscr.com/6vo7x7.
I really need help, if someone needs more information to solve the problem please just comment the question.
Thanks in advance.
Sorry for bad english, I'm swedish.
From what I get from the two pictures you are trying to get padding in between to HTML elements. You can accomplish this easily by using CSS.
Try adding this to your CSS: `.header { padding-bottom:20px; }
This will tell all the HTML elements below it to move 20px below it.
Hope this helped!

Pure CSS slider left margin accretion

I am in the process of developing a site for a uni project, and I have built an automatically changing slider while only using css (it is a requirement of this project that I don't use anything else). The problem I'm experiencing is that when the slides change, the left margin begins to add up, and I can't figure out why.
I have tried making a page with just the html and css necessary for the slider to work and it works properly there, but not when incorporated into my main css page.
Any pointers would be appreciated!
The site this can be seen on is http://www.darkmatter-designs.com/
As you can see you have some margin between the images, which makes their widths effectively bigger a little bit. I see you applied a reset in your css, so this is probably coming from the white space in your html. A quick fix would be to put all the li and img on a single line with no spaces or carriage returns between them, like so:
<ul id="css-slider"><li><img src="http://cdn.gtm.net.au/images/catalogue/sp_image_108.jpg" alt="slider"></li><li><img src="http://cdn.gtm.net.au/images/catalogue/sp_image_62.jpg" alt="slider"></li><li><img src="http://cdn.gtm.net.au/images/catalogue/sp_image_59.jpg" alt="slider"></li><li><img src="http://cdn.gtm.net.au/images/catalogue/sp_image_66.jpg" alt="slider"></li></ul>
I know, it's weird.
I can't figure out what the problem is.. The css is really messy, there is a lot of useless or overwritten properties.. You have to optimize it..
But somehow I found a workaround : set the width of the #css-slider to 864px.. It's not really a proper solution but it works anyway..

CSS3 Transition different depending on search or text input?

First off, I went and looked at the responses generated for answers when asking this question. Didn't find anything similar. I'm just dealing with a weird quirk in my code pen. A result I was not expecting.
The easiest way to explain is to simply link to my code pen.
Code Pen: CSS3 Expandable Search Form
I have the same css code applied to two different types of inputs. One is a search input and the other a text input. In order to get similar results from each i have to modify the amount that the transition opens up to in width on the text input and set it to 95% instead of 100%.
My goal was to have each using the same transition code with similar transition effect. But it's not working. I would be very appreciative to anyone who takes a look at it and may be able to help me. Thanks. BTW I am a newbie to both stack overflow and code pen. I'm sorry if I do anything wrong. lol I did try and look for an answer.
I tried posting code here, but I must be doing something wrong. Everything is in code pen though.
Now have a look at your Code Pen. I have assigned class to every one.
http://codepen.io/anon/pen/AlcHr
I hope you wanted to achieve this.
Your search bar is using a different box model
box-sizing: border-box;
Apply that to the rest of your fields and they will behave the same.
The search field has a style applied by the browser of box-sizing: border-box;
Apply this to your other fields and they should behave the same.
Updated Pen

Div positioning tutorial for beginners

I am a programmer, not a designer and I don't like writing html and css code. I was using table's for layout for a long time. Now, I want to break this bad practice and start using div's in my website. This was a very important decision for me. Because I really hate using div's.
As always, I started reading written code to understand how positioning of divs work, which is the best way for me to learn something new. However, I really couldn't understand. I think there is something wrong. It shouldn't have been that hard, I really think. This div "API" is written wrong, should have been simpler. However, I know that this discussion is non-sense.
I'm now confused with the usage of the following items,
float, clear, inline, block, position, relative, absolute
I'm looking for web-sites, stackoverflow posts, tutorials for learning div's for beginners who have a programming background like me.
PS: I checked w3's CSS standards. However, it is too long and detailed. I want something shorter, easier to understand for pragmatical purposes.
When I was teaching myself HTML I spent a lot of time on W3Schools website. I simply cannot find a better place to learn HTML and CSS. Here is a sample code that demonstrates how float works:
<!DOCTYPE html>
<html>
<head>
<style>
img
{
float:right;
}
</style>
</head>
<body>
<p>In the paragraph below, we have added an image with style <b>float:right</b>. The result is that the image will float to the right in the paragraph.</p>
<p>
<img src="http://vsual.co/wp-content/uploads/2011/09/HumanRightsLogo_CO.jpg" width="95" height="84" />
This is some text. This is some text. This is some text.
</p>
</body>
</html>
If you are still unsure please fell free to visit W3Schools link 1 and W3Schools Editor
I hope this helps
I would recommend checking out the articles on http://net.tutsplus.com and the related webdesign.tutsplus site.
On their network there's also a very good introduction course on CSS, but it's not free.
Anyway it's not hard at all.
You have a few types of elements: block, inline and online-block you'll use most. Others will be used as well as defaults.
Divs are block elements, so they normally take the while weight of their parent element and as much height as they need. To form complex layouts and columns sometimes we use float, which changes this by placing the div out of the page flow so other elements stack next to it.
That's a really rough and perhaps not accurate enough description, but should serve as a starting point.
Also definitely check this out: http://learnlayout.com
It's an awesome explanation of CSS layouts by example.
I hope this will help you find your way around.

How to create a horizontal navigation in HTML/CSS above an image?

in my header I've got a large image. Above that image I want to place my navigation.
The clue about it: The ul-Navigation-element got a gradient background. But if I hover an li-Navigation-Link I would like to display the underlying image! (Hope that's clear? Otherwise I'll do some photoshop to demonstrate) This should be flexible, meaning not to give each li-Element a specific snippet form the backgroundimage.
I would prefer a JS-solution instead of a messy markup. But I appreciate every possible idea you have on your mind. Maybe I'm just overlooking the most obvious and easy solution..
Best regards (:
Here is an image of what I tried to descripe. Hope it helps:
http://s7.directupload.net/images/110226/pv4v4c5r.jpg
There's no need for JS to do this, simply make it so that when you hover over the li-Navigation-Link, the element doesn't have a background attribute set.
This will create the 'transparency' that you want to achieve.
you can use background:transparent for a:hover. This will show the background.
(for internet explorer you could use filter:alpha(opacity=100) );
Here an example: http://jsfiddle.net/3C9sZ/2/
I just solved my problem with javascript/jquery. It can be found here http://jsfiddle.net/QwJKY/.