Developing a wordpress blog. Wanting to install the GCS box over an image centered inside the page.
Example: Have an image 700px by 100px centered inside a page. I would like to add the custom search box over that image to create a "background" for the custom search box
You could take the class/id of the search box and position it in the center of the surrounding div (image background) using position relative or absolute whichever works better.
If you need a code example just ask.
Related
What I am trying to do is similar to an image map - in reverse. I have a large image (over 2000x2000) and want to give links to coordinates on the image. There are items in the image that I would like users to be able to jump directly to with having to scan over the whole image manually. Is this possible with either CSS or HTML by adding links to coordinates or adding anchors to the image? I would use js if that was an option as well.
Interesting. The notion of jumping to a position on a web browser window is limited in general. Here are some general possibilities, without specific implementation details:
You could treat it as a sprite image, and use JavaScript/jQuery to change the image coordinates so that the point of the image you are interested in moves to the the top left of a div positioned on the page. But the portion of the image above and to the left of that point would not be visible.
You could define it as a background image in a div, and define an invisible table or invisible fixed-position divs within that div, and link to specific divs or cells in that overlay. In this case, a y-coordinate in the image where the div or cell is positioned would probably move to the top of the browser window, but horizontal positioning would be problematic. If the div or cell you target is off the screen to the right or left, the page would shift to expose it, but I don't thing that you could guarantee where the specific x-coordinate would be positioned. Also, if the target is near the bottom of the web page, that target point will not move to the top. But this solution wouldn't require JavaScript/jQuery - it would just mean linking to element ID's on the page.
This is almost the same as #2... You could overlay the image with divs and/or a table at higher z-levels, and link to those divs or table cells.
You could use JavaScript/jQuery to position a fixed-size div with visible borders so that its upper-left corner is at the position in the image that you are interested in. I think you'd still have to link to that div in order to make sure that it is visible in the current viewport.
You should be able to lay out a form over the image and move the cursor to fields on the form. I think that the form could be transparent so that the cursor appears to be moving around on the image. But you'd need be confident that the data entry cursor is sufficiently visible on top of the image to be useful.
Imagine this is my header http://freedesignfile.com/upload/2013/01/banner-2.jpg, and the button have to be clickable. I don't want to slice the images and put it into blocks. How can the button be clickable and achieved responsive in the same time??
I am not sure why you want to be so complacent as this can simply be done via Pure CSS only where you can put your image as a background an create this button via CSS and make it clickable.
But, like you have mentioned you do not want to go this way, the only way would be to create another image for a responsive layout and on that image, you need to show/hide based on your requirements and assign a class that changes the click position to match it as per your new image button using image map.
Hope this helps.
I have a validation control elements in ASP.NET which they needs to be inside form tag in order to work, that's why I'm doing silly things with positioning div which includes validation controls but I can't get it to work. Please check my two images:
Here is my current layout. Gray div is actually div whre validation controls are. Because as you see this site has plenty of space so I want to position gray div on the left side, just like you will see in second image.
I've already positioned like shows upper image (with properties: top, left, position absolute), but if I resize browser window, gray div will overlay centered div ( will stay on the same spot ). Check following image to see what I mean:
This is a very easy answer! Give your body a min-width.
body {
min-width: 1000px;
}
You will have to find out what the brown div and gray div equal plus a little room to give space between them.
If you want it to happen only on a certain page then use this java script if statement.
if(document.location.href === 'pageURL.com') {
$('body').css('min-width', '1500px');
}
to find page URL go into a web console and type in document.location.href and it will give you the exact url.
I have this code: jsfiddle
I want it to look like this, but I do not want the surrounding div. I want to have the form overlay ontop of an image tag, but to look like the second link.
So how can i make the login box over the image without having the image as a background
In order to do what you want you must position the login box absolutely and set a z-index so that it will display properly. Here is a link: link
Personally I prefer to use a container with a background for this sort of thing, as positioning some thing absolutely can be complicated in the rest of the layout. Either way, this link should do what you want.
http://jsfiddle.net/Weach/1/
This is the problem: I created a background image using the css which you can see in the JSfiddle. I center aligned it so it always comes in the center horizontally and starting from top.
There is an image I want to always come above the menu option. It's not really an image but I will make some effect using JavaScript. I always want this image to appear above the menu option irrespective to the browser or the resolution of the screen.
Did you consider using your background as a css background?
Position your other image inside it, using margin, hard defined width (or float).
(Also, cleaned your demo a bit).