Search Results

Search found 4489 results on 180 pages for 'black cobra'.

Page 157/180 | < Previous Page | 153 154 155 156 157 158 159 160 161 162 163 164  | Next Page >

  • Child elements changing opacity with parent Image

    - by mitch
    I have a <div> element which has a background image. On top of that I have some text that is hidden but when the user hovers over the <div> element that text will show and the <div> opacity will lower. My problem is when you hover over the div all elements inside that change opacity as well. I have looked through stackoverflow to see if anyone has the same problem but all i found were answers that had RGBA using background colors (not images). Here is my css: .pic{ background-image:url(http://www.granitesportsinstitute.com/wp-content/uploads/2014/06/Green-Sea-Turtle-150x150.jpg); -webkit-transition: all .3s ease-in-out; -moz-transition: all .3s ease-in-out; -o-transition: all .3s ease-in-out; transition: all .3s ease-in-out; } .textstuff{ visibility:hidden; } .pic:hover .textstuff{ visibility:visible; color:black; } .pic:hover{ filter: alpha(opacity=30); -moz-opacity: 0.3; -khtml-opacity: 0.3; opacity: 0.3; } HTML HERE: <div class="pic" style="height:150px;width:150px;"> <div class="textstuff">this is text</div> </div>

    Read the article

  • Moving a high quality line on a panel c#

    - by user1787601
    I want to draw a line on a panel and then move it as the mouse moves. To do so, I draw the line and when the mouse moves I redraw the line to the new location and remove the previous line by drawing a line with the background color on it. It works fine if I do not use the high quality smoothing mode. But if use high quality smoothing mode, it leave traces on the panel. Does anybody know how to fix this? Thank you. Here is the code int x_previous = 0; int y_previous = 0; private void panel1_MouseMove(object sender, MouseEventArgs e) { Pen pen1 = new System.Drawing.Pen(Color.Black, 3); Pen pen2 = new System.Drawing.Pen(panel1.BackColor, 3); Graphics g = panel1.CreateGraphics(); g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality; g.DrawLine(pen2, new Point(0, 0), new Point(x_previous, y_previous)); g.DrawLine(pen1, new Point(0, 0), new Point(e.Location.X, e.Location.Y)); x_previous = e.Location.X; y_previous = e.Location.Y; } Here is the snapshot with SmoothingMode Here is the snapshot without SmoothingMode

    Read the article

  • Change clickable TextView's color on focus and click?

    - by Daniel Jonsson
    I have a clickable TextView that I want to give some colors to. But I don't know how. Here are the relevant code snippets from my two files that I'm working with: TextView title = new TextView(this); title.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT)); title.setTextColor(R.color.textcolor); title.setText(titleLine); title.setTypeface(null, Typeface.BOLD); title.setClickable(true); title.setId(idLine); title.setFocusable(true); title.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { /* Irrelevant code */ } }); And this is my textcolor.xml file: <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_pressed="true" android:color="#000000"/> <!-- pressed --> <item android:state_focused="true" android:color="#000000"/> <!-- focused --> <item android:color="#000000"/> <!-- default --> </selector> When I use the textcolor-file by typing title.setTextColor(R.color.textcolor);, the textcolor just becomes grey, regardless if I press it or so. Which is strange since I have written "#000000" in all color fields. But if I remove the setTextColor code, gets the textView a light grey color, and when I press it, it becomes black. But that aren't the colors that I want. So, can anyone help me with this problem? Just to clarify: I want to be able to specify the colors for the text when it's normal, pressed and focused.

    Read the article

  • Highlighting a custom UIButton

    - by Dan Ray
    The app I'm building has LOTS of custom UIButtons laying over top of fairly precisely laid out images. Buttonish, controllish images and labels and what have you, but with a clear custom-style UIButton sitting over top of it to handle the tap. My client yesterday says, "I want that to highlight when you tap it". Never mind that it immediately pushes on a new uinavigationcontroller view... it didn't blink, and so he's confused. Oy. Here's what I've done to address it. I don't like it, but it's what I've done: I subclassed UIButton (naming it FlashingUIButton). For some reason I couldn't just configure it with a background image on control mode highlighted. It never seemed to hit the state "highlighted". Don't know why that is. So instead I wrote: -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { [self setBackgroundImage:[UIImage imageNamed:@"grey_screen"] forState:UIControlStateNormal]; [self performSelector:@selector(resetImage) withObject:nil afterDelay:0.2]; [super touchesBegan:touches withEvent:event]; } -(void)resetImage { [self setBackgroundImage:nil forState:UIControlStateNormal]; } This happily lays my grey_screen.png (a 30% opaque black box) over the button when it's tapped and replaces it with happy emptyness .2 of a second later. This is fine, but it means I have to go through all my many nibs and change all my buttons from UIButtons to FlashingUIButtons. Which isn't the end of the world, but I'd really hoped to address this as a UIButton category, and hit all birds with one stone. Any suggestions for a better approach than this one?

    Read the article

  • Use AttachedProperty in Style in ControlTemplate

    - by Andrey
    Here is my simple app: <Window x:Class="WpfApplication1.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:app="clr-namespace:WpfApplication1" Title="Window1" Height="300" Width="300"> <Window.Resources> <Style x:Key="Test"> <Setter Property="Button.Template"> <Setter.Value> <ControlTemplate> <Border BorderBrush="Blue" BorderThickness="3" Background="Black" CornerRadius="{Binding app:Extras.CornerRadius}" > </Border> </ControlTemplate> </Setter.Value> </Setter> </Style> </Window.Resources> <Grid> <Button Height="23" HorizontalAlignment="Left" Margin="29,26,0,0" Name="button1" VerticalAlignment="Top" Width="75" app:Extras.CornerRadius="10" Style="{StaticResource Test}" >Button</Button> </Grid> </Window> Here is my AttachedPropery: namespace WpfApplication1 { public class Extras { public static readonly DependencyProperty CornerRadiusProperty = DependencyProperty.RegisterAttached( "CornerRadius", typeof(double), typeof(Button), new FrameworkPropertyMetadata(1.0d, FrameworkPropertyMetadataOptions.AffectsRender) ); public static void SetCornerRadius(UIElement element, double value) { element.SetValue(CornerRadiusProperty, value); } public static double GetCornerRadius(UIElement element) { return (double)element.GetValue(CornerRadiusProperty); } } } CornerRadius="{Binding app:Extras.CornerRadius}" this of course doesn't work. so how can I get value from here app:Extras.CornerRadius="10" thanks in advance!

    Read the article

  • Css absolute position don't work in MS WORD

    - by Tim
    Hello! This is a sample: <html> <head> <title>word test</title> </head> <body> <div style='position: absolute; width: 30px; height: 50px; top: 100px; left: 20px; border-color: black; border-width: 1px; border-style: solid;'> <p>Hello!</p> </div> </body> </html> Save it as "word.doc" and open in MS WORD. Absolute position don't work! Div is rendered on the top of document and with 100% width. Why? I can't use a html tables. Version on ms word: 2003

    Read the article

  • Ensuring WPF window is on top all the time even when user clicks another maximised application

    - by mttumbledown
    Hi I am trying to ensure my WPF window stays on top as long as it is open. It is acting as a pop-up set to TopMost=true, and a call to the win32 SetWindowPos to TOPMOST. When first opened it appears on top of another running application on the desktop- maximized or not. If the user activates or uses a window in the application mine loses focus and disappears. I thought of manipulating the other application window, setting it to a lower z index. How do I find the application window? How do I iterate through all windows? (This question still stands, even if it is not the correct approach). I would be using SetWindowPos, GetForegroundWindow, GetForegroundWindow, GetDesktopWindow et cetera. I suspect that as soon as the user clicks in their application that it will still focus it regardless and I am barking up the wrong tree. At the moment, my application is a black box and I can’t handle it the other way, for example, periodically messaging my app to focus. I also thought of having a long running background thread which periodically focuses my WPF popup, but need to watch resources and processor. Kind regards,

    Read the article

  • div:hover is affecting all elements below

    - by Jesse
    Here is a sample fiddle: http://jsfiddle.net/K2zyU/4/ The problem I am experiencing is that the main navigation hover is applying to the sub navigation items. If for example, I were to move the list above the main navigation div the hover works as I would expect? I'm unsure of what I'm missing / doing wrong in this case. <div class="main">MAIN NAV<div> <ul class="sub"> <li>SUB NAV 1</li> <li>SUB NAV 2</li> <li>SUB NAV 3</li> <li>SUB NAV 4</li> <li>SUB NAV 5</li> <li>SUB NAV 6</li> </ul> .main:hover, .sub li:hover { color: black; background-color: #f3ffff; opacity: .6; }

    Read the article

  • Do double forward slashes direct IE to use specific css?

    - by kjh
    I have just found something very weird while developing a website. While trying to get a div element to display across the top of the screen, I noticed that I wasn't achieving a desired result in any browser except for old versions of IE. In order to test some different code, instead of deleting the faulty line, I used '//' to comment it out (I'm not really even sure if that works in css) but what happened was, the compatible browsers used the uncommented code, while IE used the code marked by '//'. here is the code: #ban-menu-div{ position:fixed;top:0; //position:relative; //<-- IE keeps the banner with rel pos while the other display:block; // browsers used fixed margin:auto; padding:0px; width:100%; text-align:center; background:black; } so basically, it seems as though // can be used to instruct newer browsers to ignore specific lines of code, and instruct older versions of IE to use it? If this is common practice someone please let me know. it sure makes developing for older browsers a hell of a lot easier

    Read the article

  • ASP.NET javascript embed in template column

    - by Mahesh
    Hi, I am developing a web page in which a rad grid displays the list of exams. I included a template column which shows count down timer when the exam is going to expire. Code is as given below: <telerik:RadGrid ID="radGrid" runat="server" AutoGenerateColumns="false"> <MasterTableView> <Columns> <telerik:GridTemplateColumn HeaderText="template" DataField="Date"> <ItemTemplate> <script language="JavaScript" type="text/javascript"> TargetDate = '<%# Eval("Date") %>'; BackColor = "white"; ForeColor = "black"; CountActive = true; CountStepper = -1; LeadingZero = true; DisplayFormat = "%%D%% Days, %%H%% Hours, %%M%% Minutes, %%S%% Seconds."; FinishMessage = "It is finally here!"; </script> <script language="JavaScript" src="http://scripts.hashemian.com/js/countdown.js" type="text/javascript"></script> </ItemTemplate> </telerik:GridTemplateColumn> </Columns> </MasterTableView> </telerik:RadGrid> I am giving DataTable as datasource to this grid. But my problem is , the template column is showing data only for the first record and the value taken is from the last row in the DataTable. For Ex: If I give data as given below, I can see 3 records but with only the first record displaying the counter with last value(10/10/2010 05:43 PM). 02/02/2011 01:00 AM 08/09/2010 11:00 PM 10/10/2010 05:43 PM Could you please help in this?? Thanks, Mahesh

    Read the article

  • Can I modify the way Windows draws the Aero UI?

    - by LonelyPixel
    Windows 7 with Aero Glass basically looks quite nice I think. But it has some major drawbacks regarding readability: I cannot easily tell whether a window is currently active or not. I've been tweaking the colours and transparency levels a lot recently but the only safe indicator is the close button: it's red when the window is active, it's colourless otherwise. Then there's the window title text. It is always painted black, on however dark a background. Again, regardless of whether the window is active or not. I've seen WindowBlinds and the tons of available themes you can use with it. Browsing through the most popular or highest rated in several categories I was really scared. I don't want to face Terminator every day, feel like in the Jungle or be fooled that I had an Apple computer which I do not. All I want to change is to make a greater colour difference between active and inactive windows and to invert the window title text colour for dark backgrounds. (Including that visibility hack of a spray brush background.) Is there some Windows API to alter the way Windows draws its windows or does it take the years of private research from Stardock to hook into that? I mean they say it's approved by Microsoft, so I assume there's some official documentation for that, I just couldn't find any.

    Read the article

  • Frame sizing of tableview within nested child controllers/subviews

    - by jwoww
    I'm a bit confused by the proper frame sizing of a table view to fit within my screen. Here's my setup of view controllers within view controllers: UITabBarController UINavigationController as one of the tab bar viewcontrollers; title bar hidden ViewController - a container view controller because I need the option to place some controls beneath the UITableView, sometimes (but not in the current scenario) UITableViewController Now, my question is what the proper frame dimensions of the UITableview should be. Here's what I've got in the ViewController viewDidLoad method. I used subtracted 49.0 (the size of the tab bar) from 480.0. However, this leaves a black bar at the bottom. 20.0 appears to do it (coincidentally?) the size of the status bar, but I don't understand why that would be. Wouldn't the true pixel dimensions of the tableview be 480-49? // MessageTableViewController is my subclass of UITableViewController MessagesTableViewController *vcMessagesTable = [[MessagesTableViewController alloc] init]; CGRect tableViewFrame = CGRectMake(0, 0, 320.0, 480.0 - 49.0); [[vcMessagesTable view] setFrame:tableViewFrame]; self.tableViewController = vcMessagesTable; [self addChildViewController:vcMessagesTable]; [[self view] addSubview:vcMessagesTable.view]; Here's how it looks:

    Read the article

  • height autoflow autofill into out div

    - by Brian Putt
    I have a fiddle(http://jsfiddle.net/pwnagecss/LnNYv/) and need help in making it so the classes sideBar, and rightContentWrapper autofill to the height. <div class="wrapper"> <div class="sideBar"> </div> <div class="rightContentWrapper"> <div class="rightContent"> </div> </div> </div> .wrapper { width: 960px; height: 100%; margin: 0 auto 20px auto; padding: 0; background-color:black; } .wrapper:after{ clear: both; display: block; height: 0; visibility: hidden; content: "0020"; } .sideBar { float: left; width: 200px; background-color:blue; min-height: inherit; height: 100%; } .rightContentWrapper { float: left; width: 760px; height: 100%; min-height: inherit; } .rightContent { margin: 0 auto; background-color: red; min-height: inherit; } Any help is appreciated

    Read the article

  • How can I break up long words instead of overflowing?

    - by ripper234
    How can I stop this text from overflowing? <html> <head> <style type="text/css"> .sticky { background-color: #FCFC80; margin: 5px; height: 100px; width: 135px; } .sticky .edit { vertical-align:middle; height: 100px; position:relative; color:Black; background-color:blue; height:90px; vertical-align:middle; width:90px; border-collapse:collapse; } </style> </head> <body> <div id="note44" class="sticky"> <div id="text44" class="edit" title="Click to edit" style="">A very long word: abcdefasdfasfasd</div> </div> </body> </html>

    Read the article

  • Updating the foreground of a label on window active property-WPF

    - by Deb
    I have a label which shows the name of the window. I want to update the colour of the label on the IsActive property of the window using styles and triggers so that all the labels inheriting this style should exhibit the same property. Please can anyone suggest me how? I tried like this: <Style TargetType="{x:Type Label}" x:Key="HeaderLabel"> <Style.Triggers> <DataTrigger Binding="{Binding (Window.IsActive)}" Value="True"> <Setter Property="FontSize" Value="15"/> <Setter Property="FontWeight" Value="Bold"/> <Setter Property="FontFamily" Value="Arial"/> <Setter Property="Foreground" Value="Black"/> <Setter Property="HorizontalAlignment" Value="Left"/> </DataTrigger> <DataTrigger Binding="{Binding (Window.IsActive)}" Value="False"> <Setter Property="FontSize" Value="15"/> <Setter Property="FontWeight" Value="Bold"/> <Setter Property="FontFamily" Value="Arial"/> <Setter Property="Foreground" Value="White"/> <Setter Property="HorizontalAlignment" Value="Left"/> </DataTrigger> </Style.Triggers> </Style>

    Read the article

  • Inheritance concept java..help

    - by max
    Hi everyone. I'd be very grateful if someone could help me to understand the inheritance concept in Java. Is the following code an example of that? I mean the class WavPanel is actually a subclass of JPanel which acts as a superclass. Is that correct? If so it means that "what JPanel has, also WavPanel but it is more specific since through its methods you can do something else". Am I wrong? thank you. Max import javax.swing.JPanel; class WavPanel extends JPanel { List<Byte> audioBytes; List<Line2D.Double> lines; public WavPanel() { super(); setBackground(Color.black); resetWaveform(); } public void resetWaveform() { audioBytes = new ArrayList<Byte>(); lines = new ArrayList<Line2D.Double>(); repaint(); } }

    Read the article

  • Force screen size when testing embedded DOS app in Windows 7 command window

    - by tomlogic
    I'm doing some embedded DOS development with OpenWatcom (great Windows-hosted compiler for targeting 16-bit DOS applications). The target hardware has a 24x16 character screen (that supposedly emulates CGA to some degree), and I'm trying to get the CMD.EXE window on my Windows 7 machine to stay at a fixed 24x16 without any scroll bars. I've used both the window properties and MODE CON: COLS=24 LINES=16 to get the screen size that I wanted, but as soon as my application uses an INT10 BIOS calls to clear the screen, the mode jumps back to 80x24. Here's what I'm using to clear the screen: void cls(void) { // Clear screen and reset cursor position to (0,0) union REGS regs; regs.w.cx = 0; // Upper left regs.w.dx = 0x1018; // Lower right (of 16x24) regs.h.bh = 7; // Blank lines attribute (white text on black) regs.w.ax = 0x0600; // 06 = scroll up, AL=00 to clear int86( 0x10, &regs, &regs ); } Any ideas? I can still do my testing at 80x24 (or 80x25), but it doesn't entirely behave like the 24x16 mode.

    Read the article

  • Safari & Frames in html

    - by user575838
    Hi, I am using Windows Expression web to design a embedded quicktime player that plays 4 separate videos in a main frame. Yes, I am using frames. Header Frame, Left Bar frame, Footer & Main centre frame. Everything works in Explorer as it should. See the picture ![Web Frames preview in Explorer, links work, link plays dif videos when clicked.][1] <html> Untitled 1 <div style="position: absolute; width: 100px; height: 100px; z-index: 1" id="layer1"> </div> <p>This page uses frames, but your browser doesn&#39;t support them.</p> </body> </noframes> When I check it in Safari, the video is misaligned in the frame & the background color is black, which I want it white. All the links work, it's just the misalignment & background color. See the picture. ![Safari Preview][2] Firefox also works. Here's the code, page source from the Safari browser. Heres a pic of Safari misalignment. Heres the Safari Code code Please help. It may be simple but I'm a newb. I appreciate any advice from you pro's.

    Read the article

  • Blackberry UI tool bar : fields alignment

    - by Galaxy
    i am developing custom toolbar manager, but i want to adjust the fields alignment to be centered not aligned to the left , any advice below is the code of toolbar package galaxy.bb.ui.container; import net.rim.device.api.ui.Color; import net.rim.device.api.ui.Graphics; import net.rim.device.api.ui.XYEdges; import net.rim.device.api.ui.container.HorizontalFieldManager; import net.rim.device.api.ui.decor.Background; import net.rim.device.api.ui.decor.BackgroundFactory; import net.rim.device.api.ui.decor.Border; import net.rim.device.api.ui.decor.BorderFactory; public class ToolBarManager extends HorizontalFieldManager { private int bgColor = Color.BLACK; private int borderColor = Color.WHITE; private int borderStyle= Border.STYLE_FILLED; public ToolBarManager(){ super(USE_ALL_WIDTH); } public ToolBarManager(int bgColor) { super(USE_ALL_WIDTH); this.bgColor = bgColor; } public ToolBarManager(int bgColor, int borderStyle) { super(USE_ALL_WIDTH); this.bgColor = bgColor; this.borderStyle = borderStyle; } public int getBgColor() { return bgColor; } public void setBgColor(int bgColor) { this.bgColor = bgColor; } public int getBorderColor() { return borderColor; } public void setBorderColor(int borderColor) { this.borderColor = borderColor; } public int getBorderStyle() { return borderStyle; } public void setBorderStyle(int borderStyle) { this.borderStyle = borderStyle; } protected void paint(Graphics graphics) { super.paint(graphics); XYEdges padding = new XYEdges(5, 5, 5, 5); Border roundedBorder = BorderFactory.createRoundedBorder(padding, borderColor, borderStyle); this.setBorder(roundedBorder); Background bg = BackgroundFactory.createSolidBackground(bgColor); this.setBackground(bg); } }

    Read the article

  • CSS - How to prevent the browser from showing scrollbars when a div goes outside of the window?

    - by xarfai
    I have a centered wrapper with following CSS: div.wrapper { width: 1170px; padding-left:30px; margin-top: 80px; margin-bottom:20px; margin-left: auto; margin-right: auto; position:relative; background-color:black; } inside i have a div with following css: position:absolute; top:-26px; left:517px; height:63px; z-index:3; inside of this div is an image which has 759px width, that makes the wrapper grow larger and makes the browser show a v-scrollbar on lower display resolutions. what i want is to make the image go outside the wrapper but prevent the browser from showing the scrollbar, so that the right side of the image is only shown if your browser window is large enough and the wrapper keeps its 1200px width. i can't make it a background image because it goes over some of the other content. something that is compatible with = IE7 would be nice

    Read the article

  • Space between 2 vertices on a heightmap

    - by Sietse
    First off, I am sorry for the crazy title. I couldn't really think of something else. I am working on a hobby project, it's a infinite world generated with Perlin Noise, Java and LWJGL. But I am having a problem, it is kinda hard to explain, so I made a video: http://youtu.be/D_NUBJZ_5Kw Obviously the problem is the black spaces in between all the pieces of ground. I have no idea what is causing it. I already tried making all the values doubles instead of floats, but that didn't fix it. Here is a piece of code I am using: float height2, height = (float)getHeight(x, y); height2 = (float) ((getHeight(x-1, y+1) + height) / 2); vertexhelper.addVertexColorAndTexture(x, height2, y+1, r, g, b, a, 0f, 1f); height2 = (float) ((getHeight(x+1, y+1) + height) / 2); vertexhelper.addVertexColorAndTexture(x+1, height2, y+1, r, g, b, a, 1f, 1f); height2 = (float) ((getHeight(x+1, y-1) + height) / 2); vertexhelper.addVertexColorAndTexture(x+1, height2, y, r, g, b, a, 1f, 0f); height2 = (float) ((getHeight(x-1, y-1) + height) / 2); vertexhelper.addVertexColorAndTexture(x, height2, y, r, g, b, a, 0f, 0f); I loop through this at the initialization of a chunk with x-16 and y-16. vertexhelper is a class I made that just puts everything in a array. (I am using floats here, but that's after doing the maths, so that shouldn't be a problem) I highly appreciate you reading this.

    Read the article

  • How to document an existing small web site (web application), inside and out?

    - by Ricket
    We have a "web application" which has been developed over the past 7 months. The problem is, it was not really documented. The requirements consisted of a small bulleted list from the initial meeting 7 months ago (it's more of a "goals" statement than software requirements). It has collected a number of features which stemmed from small verbal or chat discussions. The developer is leaving very soon. He wrote the entire thing himself and he knows all of the quirks and underlying rules to each page, but nobody else really knows much more than the user interface side of it; which of course is the easy part, as it's made to be intuitive to the user. But if someone needs to repair or add a feature to it, the entire thing is a black box. The code has some minimal comments, and of course the good thing about web applications is that the address bar points you in the right direction towards fixing a problem or upgrading a page. But how should the developer go about documenting this web application? He is a bit lost as far as where to begin. As developers, how do you completely document your web applications for other developers, maintainers, and administrative-level users? What approach do you use, where do you start, do you have a template? An idea of magnitude: it uses PHP, MySQL and jQuery. It has about 20-30 main (frontend) files, along with about 15 included files and a couple folders of some assets. So overall it's a pretty small application. It interfaces with 7 MySQL tables, each one well-named, so I think the database end is pretty self-explanatory. There is a config.inc.php file with definitions of consts like the MySQL user details, some from/to emails, and URLs which PHP uses to insert into emails and pages (relative and absolute paths, basiecally). There is some AJAX via jQuery. Please comment if there is any other information that would help you help me and I will be glad to edit it in.

    Read the article

  • Problem with overlapping divs - CSS

    - by Chaitanya
    html, body {margin: 0px; padding: 0px;} #pageContainer{ margin: auto; padding: auto;} #contentContainer{ margin:150px; width:1100px; height: 100%; overflow: hidden; } #leftContainer{ width: 80%; min-height: 800px; background: #009900; float:left;} #left1{ margin:80px 0 0 80px; height: 550px; top:0px; z-index:1; background: #000000;} #left2{ margin:80px 0 0 80px; height: 500px; top:110px; z-index:2000; background:#99FFFF; } #rightContainer{ width: 20%; height: inherit; background: black; float:right;} / CSS Document */ I require 2 overlapping divs, which look like the one below. ---------------------- | | | ------------------ | | ' '| | ' '| | ' '| | ' '| | ' '| | ' '| | ' '| ---------------------- ' ' ' ' ------------------- <div id="pageContainer"> <div id="contentContainer"> <div id="leftContainer"> Am the left container <div id="left1"> <div id="left2"> </div> </div> </div> <div id="rightContainer"> </div> </div> </div> The problem is am failing to get the overlap. Where am I going wrong? Edit 1: topx was a typo, corrected it.

    Read the article

  • iphone: re-sizing gradient after shift from portrait to landscape

    - by d_CFO
    In viewDidLoad, I can create a gradient with no problem: CAGradientLayer *blueGradient = [[CAGradientLayer layer] retain]; blueGradient.frame = CGRectMake(gradientStartX,gradientStartY,gradientWidth,gradientHeight); where gradientWith is device-defined as 320 or 1024 as appropriate. What I can’t do is resize it inside willRotateToInterfaceOrientation: -– and thus get rid of that empty black space off to the right -- after the user changes to landscape mode. (The nav bar and tab bar behave nicely.) (1) Recalibrating the gradient’s new dimensions according to the new mid-point, (2) using kCALayerMaxXMargin, and (3) employing bounds all looked like they would do the job. bounds looked a litte more intuitive, so I tried that. I don’t want to admit that I have made zero progress. I will say that I’ve been reduced to the brute force method of trying every permutation of self, view, layer, bounds, blueGradient, and CGRect(gradientStartX,gradientStartY,newGradientWidth,newGradientHeight) with zero success. This is not difficult. My lack of understanding is making it difficult. Anyone out there “Been there, done that”?

    Read the article

  • Maximized MFC window has dead region at the top

    - by John Calsbeek
    I'm trying to make a MFC window fullscreen whenever it is maximized. This window is being used to draw OpenGL content. So far it works fine—it fills the entire screen with the exception of the taskbar—but there's a dead black region at the top of the screen, 62 pixels in height. It's pretty darn close to the height of the Windows 7 taskbar, but it pretty much stays the same regardless of if the taskbar is on autohide or on a different side of the screen. When I get a CWind::OnSize callback, the height that is given is 988, which is 62 pixels short of the actual screen height (1050). I've tried to manually set the window height to 1050 with SetWindowPos, I've tried to give Windows the screen dimensions in CWnd::OnGetMinMaxInfo, and I've tried to give the screen dimensions to glViewport instead of the 988 pixels that I'm being given. None of these seem to work. I'm accomplishing the fullscreening with a call to… ModifyStyle(0, WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_SYSMENU | WS_CAPTION | WS_POPUP, 0); …in the SIZE_MAXIMIZED CWnd::OnSize callback, which works fine, except for this dead region. I don't know if it's an OpenGL thing or a Win32 thing or a MFC thing. The GetClientRect function for my window reports the false 988 height. The same OpenGL rendering code works fine in my Mac OS X build. Curiously enough, I have gotten the dead region to move around a bit when I play with the taskbar (autohiding it, moving it around the screen, etc.). I've gotten the dead area to shrink to about half—not sure if the other half went to the bottom of the window or not.

    Read the article

< Previous Page | 153 154 155 156 157 158 159 160 161 162 163 164  | Next Page >