Avatar of Paul Tomasi
Paul TomasiFlag for United Kingdom of Great Britain and Northern Ireland

asked on 

DIV question

If I have a header at the top of a page created using DIV, and I want to place a logo image to the left and text (phone number) to the right, do I need to define and use two seperate embedded DIVs?

And how would I position them? And can I make them relative to the 'header' region instead of the page itself?
Web DevelopmentHTMLCSS

Avatar of undefined
Last Comment
Prafulla Maharjan
Avatar of Paul Tomasi
Paul Tomasi
Flag of United Kingdom of Great Britain and Northern Ireland image

ASKER

Or, should I use a table inside the header DIV to create 2 side-by-side regions?
Avatar of Paul Tomasi
Paul Tomasi
Flag of United Kingdom of Great Britain and Northern Ireland image

ASKER

I was able to do it using a 2-col single-row table...
ASKER CERTIFIED SOLUTION
Avatar of SSupreme
SSupreme
Flag of Belarus image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
SOLUTION
Avatar of SSupreme
SSupreme
Flag of Belarus image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Avatar of Paul Tomasi
Paul Tomasi
Flag of United Kingdom of Great Britain and Northern Ireland image

ASKER

SSupreme

Thank you for your reply.

Will implement your suggestion and confirm...
SOLUTION
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Avatar of SSupreme
SSupreme
Flag of Belarus image

As I mentioned earlier.
Avatar of Paul Tomasi
Paul Tomasi
Flag of United Kingdom of Great Britain and Northern Ireland image

ASKER

Okay, I've tried so hard to put a site together using DIVs I've abandoned them in favour of tables for now.

I will award point regardless and accordingly.
SOLUTION
Avatar of amitlamba
amitlamba
Flag of India image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Avatar of SSupreme
SSupreme
Flag of Belarus image

amitlamba, what are you doing? spamming?
Avatar of Paul Tomasi
Paul Tomasi
Flag of United Kingdom of Great Britain and Northern Ireland image

ASKER

amitlamba

I didn't know you could that. I love the idea of #header img... and #header p... to define styles relative to DIVs whose ID is 'header'.

Your simplified solution has made a few things clearer to me (okay, call me a 'newbie'...).

Looking at your code, I think the key element is the 'float:left' and 'float:right'...

I can't understand why I did not pick this up when looking at SSupreme's code (which is almost identical to your own). Maybe it's because at the time I didn't know what to look for at the time.

Thank you for your effort and time. Pity I cannot give you points too.
SOLUTION
Avatar of SSupreme
SSupreme
Flag of Belarus image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
it is good that you call the header image in the background and all the logo image and phone number you can just type in the header div.
also you can give the link in the logo

i think it will help you..
thanks.
Web Development
Web Development

Web development includes all aspects of presenting content on intranets and the Internet, including delivery development, protocols, languages and standards, server software, browser clients, databases and multimedia generation.

77K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo