473,408 Members | 2,477 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

Problems Aligning Elements

74
I'm designing a sort of error message screen.
Well it's not a screen...its just a <div> that displays the error messages and allows the user to close it (or drag it around etc.)

The title essential has two components:
- a link that contains a small image followed by the text "Error"
- a button that "closes" the screen

My problem is that when I changed the button into a button (as apposed to the link that I had it before) the text "Error" is squished over next to the image.

When the close button was simply a link it displayed properly:
the image was on the right (floated there), the close link on the left (floated there), and the "Error" text was displayed in the middle.

Is there anything I'm doing wrong?

Expand|Select|Wrap|Line Numbers
  1. <div id="PNL_ErrorMessages" style="position:absolute;top:20;left:20;width:350px;height:auto;padding:5px 5px 5px 5px;visibility:visible;">
  2.  
  3.     <div style="background-color:#C00000; color:White; width:100%;  border:solid 2px black; border-bottom:none; text-align:center; padding: 3px 0px 3px 0px;"> 
  4.         <input name="BTN_CloseError" type="button" id="BTN_CloseError" style="float:right; padding-right:3px;" value="x" OnClick="javascript:CloseErrorWindow('PNL_ErrorMessages');" />
  5.         <a onclick="return false;" id="LBTN_Error" href="javascript:__doPostBack('LBTN_Error','')" style="color:White;;">
  6.            <img id="img_colapseError" src="../images/collapse.jpg" style="border-width:0px;float:left; padding-left:3px;" />
  7.            Error</a>
  8.     </div>
  9.     <div id="PNL_ErrorMessageContent" style="background-color:White; border:solid 2px black; width:100%; color:#C00000;">
  10.  
  11.         <span id="LBL_Error">Error Message:<br />My error Messages</span>
  12.  
  13.     </div>   
  14.  
  15. </div>
  16.  
  17.  
Thanks!

-LilOlMe
Jun 6 '07 #1
7 1650
drhowarddrfine
7,435 Expert 4TB

Isn't this what you meant?
Jun 6 '07 #2
lilOlMe
74

Isn't this what you meant?

Yeah that's what I want it to look like.
<edit>errr...you're missing an image....</edit>
But the "Error" in the title bar is squished over with the collapsing image on the left.

<edit>The image on the left indicates if the div is "collapsed" or "expanded"</edit>

-LilOlMe
Jun 7 '07 #3
drhowarddrfine
7,435 Expert 4TB
That's what I had in IE6 but I don't have the image.
Jun 7 '07 #4
lilOlMe
74
That's what I had in IE6 but I don't have the image.
Aye,

When I take the image out its fine.
When I take the button out its fine.
But with the two of them the "Error" gets squished over.

The image is tiny ...how do I post it for you like you posted that one?

-LilOlMe
Jun 7 '07 #5
drhowarddrfine
7,435 Expert 4TB
You have to use a service like imageshack.com and link to it.
Jun 7 '07 #6
lilOlMe
74
You have to use a service like imageshack.com and link to it.
What?
Its simply an <img> tag that is set by an Ajax function depending on whether or not the window is "rolled up/ collapsed" or "expanded"

Showing the image isn't the problem.

The problem is that the text "Error" isn't aligned in the middle of the title bar. It is squished over next to the <img> (floated on the left) when the close button (floated on the right) is added to the title bar.

I used to have the close button represented by a <a href>X</a> and everything looked fine....but when I changed it into a button (appropriately) it moves the text: "Error" over next to the <img> tag.

I just can't seem to figure out how to make it work properly....seems like it should be simple...my CSS is just not cooperating.

-LilOlMe
Jun 7 '07 #7
lilOlMe
74
You have to use a service like imageshack.com and link to it.

OHHHH I see what you're saying.

Yeah, I'm not going to be able to upload anything.

-LilOlMe
Jun 7 '07 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: steve | last post by:
Hello, I'm reworking our company site, trying to do it without tables. It's been a bit of an... adventure. Site is starting to come along. Problem I've run into is aligning image input...
9
by: please-answer-here | last post by:
What is wrong with this code? when i place "return false" before the xfab assignment the form as intended doesn't submit. But when placed as here or in the last if/else construct the page gets...
7
by: Scott Teglasi | last post by:
Hi all, I was curious as to how others whom have dealt with this problem have handled it. The problem is that I have a site design of a fixed width and height and want to center that content...
0
by: Steven Bethard | last post by:
I'm trying to align an XML file with the original text file from which it was created. Unfortunately, the XML version of the file has added and removed some of the whitespace. For example:: ......
4
by: john | last post by:
Hi to All, I am new to html authoring, so sorry if my terminology is not correct or exact. I would like to position a footer div to the bottom of the browser window. As I research in the web...
4
by: Sjef Janssen | last post by:
Hallo, I'm trying to create boxes that have nicely spaced paragraphs, but a title that is in a colored line full-width. Here is my styles: In the div content I create the framed boxes and...
14
by: gaijinco | last post by:
I was a hobbist web coder for years but I had to sidestep for a while. Now I'm trying to return to it and I'm trying to clarify how am I supposed to do somethings with CSS v.s. HTML and I'm...
2
by: Casimir | last post by:
What would be the correct way to align checkboxes and their labels, in your opinion? For example .... <td> <input type="checkbox" class="cbox" name="thisCheck" /> <label...
10
by: jodleren | last post by:
Hi I know, that there are a lot of people having problems with orkut.com, errors like "object expected" and named objects missing. When loading the site can generate some 10 errors, and still...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.