Register    Login    Forum    Search    FAQ

Board index » Computer » HTML / CSS / Web Development




 Page 1 of 1 [ 6 posts ] 



Author Message
 Post subject: [CSS] Positioning problem
 Post Posted: Fri Jul 30, 2010 9:30 pm 
Offline
Site Administrator
Site Administrator
User avatar

Joined: Sun May 16, 2010 12:33 am
Posts: 956
Location: England
I am having problems with a design. I have 3 images that make up a bar. Like the one above this with the topic name. Theres an image for the left, and right corners, and the center image that gets repeated in width.

Now, I set both images to have an inline-block element, so one element does not take up the whole box.

Heres an example, with block display: (Ignore the dots)
--------------Page---------------
[ Title......................................]
[ Other elements........................]

Heres an example, with inline-block display:
--------------Page---------------
[ Title ]
[ Other elements... ]

I then float each element to the left, so it should appear like this:

--------------Page---------------
[ Left Corner ] [ Center Corner ] [ Right Corner ]

However, they do not appear. The divs do not have any content in them, but when I add content in them, it starts to show. I sort of figured it how, but knowing it is inline-block display, so it needs text in it for it to be displayed or it does not display.

My question is: How can I workaround this? I did used to know how it was done, but I cannot do it now.

Thanks.

_________________
Remember to search the forums, and external resources such as Google, before posting your problem. I am open to answer your questions, if you private message me.

Image Created by Will
Image


Top 
 Post subject: Re: [CSS] Positioning problem
 Post Posted: Fri Jul 30, 2010 10:23 pm 
Offline
Expert Poster
Expert Poster

Joined: Wed Jul 28, 2010 1:01 am
Posts: 124
Location: East Anglia, UK
As far as my experiences have proved, any "empty" elements will not be displayed, regardless of it's display style property.

To work around it you could always try placing a null (�) character in the element? Not elegant, but should work. :lol:

_________________
Salus populi suprema lex esto.


Top 
 Post subject: Re: [CSS] Positioning problem
 Post Posted: Fri Jul 30, 2010 11:42 pm 
Offline
Site Administrator
Site Administrator
User avatar

Joined: Sun May 16, 2010 12:33 am
Posts: 956
Location: England
Holiverh wrote:
As far as my experiences have proved, any "empty" elements will not be displayed, regardless of it's display style property.

To work around it you could always try placing a null (�) character in the element? Not elegant, but should work. :lol:


Wrong. Adding a div with the ID of image will display with the CSS properties width and height being set. You do not need to put content inside a div for it to display. My problem is, I am trying to stack the divs next to each other.

_________________
Remember to search the forums, and external resources such as Google, before posting your problem. I am open to answer your questions, if you private message me.

Image Created by Will
Image


Top 
 Post subject: Re: [CSS] Positioning problem
 Post Posted: Sat Jul 31, 2010 7:04 pm 
Offline
Expert Poster
Expert Poster

Joined: Wed Jul 28, 2010 1:01 am
Posts: 124
Location: East Anglia, UK
Mark wrote:
Holiverh wrote:
As far as my experiences have proved, any "empty" elements will not be displayed, regardless of it's display style property.

To work around it you could always try placing a null (�) character in the element? Not elegant, but should work. :lol:


Wrong. Adding a div with the ID of image will display with the CSS properties width and height being set. You do not need to put content inside a div for it to display. My problem is, I am trying to stack the divs next to each other.
Oh right, sorry, i must not of understood the question. :oops: Presuming i understand your question now: you'll need to set explicit height and width lengths (i.e. Not the default 'auto').

_________________
Salus populi suprema lex esto.


Top 
 Post subject: Re: [CSS] Positioning problem
 Post Posted: Sun Aug 01, 2010 11:44 pm 
Offline
Novice User
Novice User
User avatar

Joined: Sun May 30, 2010 12:46 am
Posts: 26
Location: USA
take a look at http://www.w3schools.com/css/css_positioning.asp this should help give the answer your looking for. if not, shoot me the code your trying to use, and I'll see what I can figure out to get it the way you want to display.

_________________
Image

"Let the fun Begin!"

http://southnorthgarden.com/
http://forksinternational.com

HTML/XHTML/CSS


Top 
 Post subject: Re: [CSS] Positioning problem
 Post Posted: Wed Aug 11, 2010 7:40 pm 
Offline
Pro Member
Pro Member
User avatar

Joined: Fri Jun 11, 2010 10:34 am
Posts: 52
Location: Philippines
using float:left; is not my deal...
try adding this:

position:absolute;
z-index:2;

if im not mistaken it should appear...

and replace you "float:left;" with this "left:0px"

_________________
Languages learning progress:

C <70%>
C++ <20%>
Java <2%>

Markup learning progress:

Html <80%>
CSS <85%>
Javascript <10%>


Top 
Display posts from previous:  Sort by  
 
 Page 1 of 1 [ 6 posts ] 




Board index » Computer » HTML / CSS / Web Development


Who is online

Users browsing this forum: No registered users and 1 guest

 
 

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: