The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> How do I get an iFrame navigation to work without losing any styling?
CW2017
post Sep 8 2017, 10:29 AM
Post #1





Group: Members
Posts: 3
Joined: 8-September 17
Member No.: 26,490



Good afternoon,

I'm working on a website where I have brought 2 sets of templates together to make a standard business website with a blog. I wish to match the navigation from the 1st set of pages and use it on the blog.

Basically, it has been necessary to use an iFrame for the navigation on the blog page as the CSS styling conflicted using other ways. The problem is I cannot get the iFrame navigation to function correctly (linking to other pages) whilst also retaining it's styling the same as the other pages.

My Code 1: (Links don't work but text styling fine)
<li><a class="active" href="index.html" data-hover="Home">Home</a></li>

My Code 2: (Links work but styling lost)
</li><a target="_parent" href="http://my-website.com"< data-hover="Home">Home</a>

As yet, I have been unable to combine the 2 and get all working, Does anyone know how to do this?

Many Thanks
Colin W
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Sep 8 2017, 10:44 AM
Post #2


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 17,772
Joined: 9-August 06
Member No.: 6



Replace the URL in the first snip with the working URL in the second.

CODE
<li><a class="active" href="http://my-website.com" data-hover="Home">Home</a></li>


You can use a relative URL, but it must correspond to where the file actually is and 'index.html' obviously didn't with your new setup.


Sidenote, your second example is full of errors. Don't use that.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
CW2017
post Sep 8 2017, 11:27 AM
Post #3





Group: Members
Posts: 3
Joined: 8-September 17
Member No.: 26,490



I've managed to do it!
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
CW2017
post Sep 8 2017, 11:28 AM
Post #4





Group: Members
Posts: 3
Joined: 8-September 17
Member No.: 26,490



Thank you! HTML is sometimes hit or miss for me
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Sep 8 2017, 11:39 AM
Post #5


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 17,772
Joined: 9-August 06
Member No.: 6



I understood that. happy.gif

It isn't brain surgery though. Just start at the beginning and you'll soon get the hang of it. smile.gif

About the Code 2 expample. In a list nothing can be outside the LIs, so you can't put the link after a closing tag for LI. Maybe you meant it to be a start tag? You've also manage to get a starting angle bracket in the middle of the starting A tag. Marked the mistakes out below.

CODE

</li><a target="_parent" href="http://my-website.com"< data-hover="Home">Home</a>
^^^^^                                                ^
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 17th December 2017 - 01:15 AM